Download the PHP package sheenazien8/hascrudactions without Composer
On this page you can find all versions of the php package sheenazien8/hascrudactions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sheenazien8/hascrudactions
More information about sheenazien8/hascrudactions
Files in sheenazien8/hascrudactions
Package hascrudactions
Short Description CRUD tirelessly 💤
License MIT
Homepage https://github.com/sheenazien8/hascrudactions
Informations about the package hascrudactions

Hascrudaction
This package allows you to build a CRUD with tiny Controller and keep the pattern are consitent.
Lifecycles
Method | Path | Function | Repository Function | Route Name |
---|---|---|---|---|
GET | base_domain/path/ | ControllerClass@index | RepositoryClass@datatable | path.index |
GET | base_domain/path/create | ControllerClass@create | ----- | path.create |
GET | base_domain/path/{id} | ControllerClass@show | ----- | path.show |
POST | base_domain/path/ | ControllerClass@store | RepositoryClass@create | path.store |
GET | base_domain/path/{id} | ControllerClass@edit | ----- | path.edit |
PUT | base_domain/path/{id} | ControllerClass@update | RepositoryClass@update | path.update |
DELETE | base_domain/path/{id} | ControllerClass@destroy | RepositoryClass@delete | path.destroy |
DELETE | base_domain/bulkDestroy/ | ControllerClass@bulkDestroy | RepositoryClass@bulkDestroy | path.bulkDestroy |
Requirements
- laravel 8.^ On Development
- laravel 7.^
- This package uses (https://yajrabox.com/docs/laravel-datatables/master/quick-starter) for index table view under the hood, Please make sure you include this dependencies before using this library.
Installation
You can install the package via composer:
Configuration
Laravel Configuration
Register the provider class in config/app.php
Lumen Configuration
Basic Usage
First, Generate the Hascrud route with this command will be generate a few class and file views, Example.
- App\Http\Controllers\EmployeeController
- App\Http\Requests\Employee\.*
- App\Repositories\EmployeeRepository
- resources/views/employee/.*
And Setup the datatable.
Install Datatable Package and Setup
Install Composer
Install Assets
Register datatables.net in resources js and css file
Compile Assets
Next, you can add the path in , edit file config in for wrapper blade layouts and javascript views, add Traits in Model Class Employee.
routes/web.php
config/hascrudactions.php
app/Employee.php
And the last, you can define what columns you want to display in the index view in , and then you must define what columns you want to add or edit in the model Employee
with property and form view , and also you can get the binding data from controller with the variable name.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Credits
- Sheena Zien
- All Contributors
License
The MIT License (MIT). Please see License File for more information.