PHP code example of codegaf / crudgenerator

1. Go to this page and download the library: Download codegaf/crudgenerator 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/ */

    

codegaf / crudgenerator example snippets

 php
php artisan config:cache
 php
‘model’ => [
    ‘fillable’ => ['name', 'surname', 'email', 'phone', 'born_date', 'user_id'],
],
 php
'dataTables' => [
   'name' => [
       'label' => 'global.name'
   ],
   'surname' => [
       'label' => 'global.surname'
   ],
   'email' => [
       'label' => 'global.label'
   ],
   'phone' => [
       'label' => 'global.phone'
   ],
   'born_date' => [
       'label' => 'global.born_date'
   
   ],
   'created_at' => [
       'label' => 'global.created_at'
   ]
],
 php
php artisan config:cache
 php
php artisan crud:generator Model --all
 php
php artisan crud:generator Model
 php
php artisan destroy:crud Model