Search by

devopstools / laracast-table

devops5426

A reusable Laravel package for testing, validating, and managing form workflows and validation logic.

Package info

github.com/alihumza5426/laracast-table

pkg:composer/devopstools/laracast-table

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-08-27 06:49 UTC

This package is auto-updated.

Last update: 2026-08-27 07:42:23 UTC


README

khan/forms is a reusable Laravel package for querying database records (Student Fees, Students, Expenses, and Taskboards), live filtering, editing, and deleting records with individual and bulk action controls.

๐ŸŒŸ Key Features

  • Multi-Entity Database Explorer: Interactive dashboard (/forms/test) to seamlessly switch between:
    • ๐ŸŽ“ Student Fees (student_fee_managers)
    • ๐Ÿ‘จโ€๐ŸŽ“ Students (students)
    • ๐Ÿ’ณ Expenses (expenses / expense_managers)
    • ๐Ÿ“‹ Taskboards / Tasks (taskboards / tasks)
  • Row Checkboxes & Bulk Delete:
    • Individual row checkbox to select specific items.
    • Master "Select All" checkbox in table header.
    • Floating Bulk Action toolbar with Delete Selected (N) and Deselect All.
  • Edit & Delete Action Buttons:
    • โœ๏ธ Edit: Opens an interactive modal to edit any database column dynamically with instant AJAX update.
    • ๐Ÿ—‘๏ธ Delete: Single entry delete with confirmation dialog.
  • Comprehensive Dynamic Filters:
    • Filter by Date & Date column (created_at, due_date, paid_date, date, fee_month, etc.).
    • Filter by Student via searchable student selector dropdown.
    • Filter by Sub-type (all, challan, student).
    • Filter by Status (paid, unpaid, pending, active, completed, etc.).
    • Live Keyword Search across title, name, roll no, challan no, remarks, and ID.
    • Configurable Limit (10, 25, 50, 100, 500/All).
  • Direct Query & CRUD API:
    • Forms::getEntries($entity, $date, $limit, $dateColumn, $filters)
    • Forms::getEntryById($entity, $id)
    • Forms::updateEntry($entity, $id, $data)
    • Forms::deleteEntry($entity, $id)
    • Forms::deleteBulkEntries($entity, $ids)
  • Artisan Generators: php artisan make:form and php artisan forms:test.

๐ŸŒ Web Interface (Database Explorer)

Navigate to: ๐Ÿ‘‰ http://127.0.0.1:8000/forms/test (or http://localhost/new_sls/public/forms/test)

How to Use:

  1. Switch Entity: Click the top tabs for Student Fees, Students, Expenses, or Taskboards.
  2. Apply Filters: Select a Date, pick a Student, choose a Status, or type in the Search box, then click "Apply Filters".
  3. Edit a Record: Click the "Edit" button on any row -> update values in the modal -> click "Save Changes".
  4. Delete a Single Record: Click "Delete" on a row and confirm.
  5. Bulk Delete: Check multiple rows (or click the header checkbox to select all) -> click "Delete Selected (N)" in the top action bar.

๐Ÿš€ Programmatic Usage (In PHP / Controllers)

use Khan\Forms\Facades\Forms;

// 1. Get entries for any entity
$fees = Forms::getEntries('fees', '2026-06-15', 10);
$students = Forms::getEntries('students', null, 50, null, ['search' => 'John']);
$expenses = Forms::getEntries('expenses', '2026-06-15', 25);
$tasks = Forms::getEntries('taskboards', null, 10);

// 2. Update an entry
Forms::updateEntry('expenses', 1, [
    'title' => 'Updated Office Supplies',
    'amount' => 350.00,
]);

// 3. Delete single entry
Forms::deleteEntry('taskboards', 12);

// 4. Bulk delete
Forms::deleteBulkEntries('fees', [101, 102, 103]);

๐Ÿ“ฆ Updating Published Views in Host Laravel Apps

If you installed this package in your Laravel project and your view hasn't updated, run:

# Force overwrite published views with latest version
php artisan vendor:publish --tag=forms-views --force

# Clear cached views & routes
php artisan view:clear
php artisan route:clear
php artisan config:clear

๐Ÿงช Running Automated Tests

php vendor/phpunit/phpunit/phpunit

Results:

OK (28 tests, 100 assertions)