PHP code example of tirjok / crud
1. Go to this page and download the library: Download tirjok/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/ */
tirjok / crud example snippets
'providers' => [
...
Tirjok\CrudGenerator\CrudGeneratorServiceProvider::class,
],
'providers' => [
...
Collective\Html\HtmlServiceProvider::class,
],
'aliases' => [
...
'Form' => Collective\Html\FormFacade::class,
'HTML' => Collective\Html\HtmlFacade::class,
],
Route::resource('posts', 'PostsController');
composer dump-autoload
php artisan vendor:publish --provider="Tirjok\CrudGenerator\CrudGeneratorServiceProvider"
php artisan crud:controller PostsController --crud-name=posts --model-name=Post --view-path="directory" --route-group=admin
php artisan crud:model Post --fillable="['title', 'body']"
php artisan crud:service PostService --model-name=Post --namespace=admin
php artisan crud:repository PostRepository --model-name=Post --filters=title#like --namespace=admin
php artisan migrate
php artisan vendor:publish --provider="Tirjok\CrudGenerator\CrudGeneratorServiceProvider"