PHP code example of efrontsa / easy_crud

1. Go to this page and download the library: Download efrontsa/easy_crud library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

efrontsa / easy_crud example snippets

`
php artisan vendor:publish --provider="EFrontSA\EasyCRUD\ServiceProvider"
`
class CityController extends Controller
{
    use \EFrontSA\EasyCRUD\Models\BasicCRUDTrait;

    public function __construct(City $model) // You can change the model type hint to update the model in this controller
    {
        $this->model = $model;
        $this->view = 'cities'; // where the views located. the trait look for (index, create, edit) views.

        app()->bind(CRUDRequest::class, CityRequest::class); // bind your request with CRUDRequest interface
    }
}