devopstools / laracast-table
A reusable Laravel package for testing, validating, and managing form workflows and validation logic.
dev-main
2026-08-27 06:49 UTC
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- illuminate/console: ^9.0|^10.0|^11.0
- illuminate/routing: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
- illuminate/validation: ^9.0|^10.0|^11.0
- illuminate/view: ^9.0|^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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)
- ๐ Student Fees (
- 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)andDeselect 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).
- Filter by Date & Date column (
- 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:formandphp 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:
- Switch Entity: Click the top tabs for Student Fees, Students, Expenses, or Taskboards.
- Apply Filters: Select a Date, pick a Student, choose a Status, or type in the Search box, then click "Apply Filters".
- Edit a Record: Click the "Edit" button on any row -> update values in the modal -> click "Save Changes".
- Delete a Single Record: Click "Delete" on a row and confirm.
- 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)