PHP code example of thereline / crudmaster

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

    

thereline / crudmaster example snippets


// config/app.php
'providers' => [
    CrudMaster\CrudMasterServiceProvider::class,
],

respond_success($payload, 'Component', ['extra'], 'Done', 'route.name');
respond_error('Something failed', 'redirect.back', ['details']);
respond_info('FYI message...');
respond_validation_failure($errors);

return [
    'ui' => 'inertia',
    'default_namespace' => 'App\\Http\\Controllers',
    'response_class' => App\\Http\\Responses\\SuccessResponse::class,
    'routes' => [
        'prefix' => 'admin',
        'middleware' => ['web', 'auth'],
    ],
];
bash
php artisan vendor:publish --tag=crudmaster-config     # Configuration file
php artisan vendor:publish --tag=crudmaster-views      # Blade views
php artisan vendor:publish --tag=crudmaster-stubs      # Customizable stubs
php artisan vendor:publish --tag=crudmaster-js         # Inertia-compatible JS
bash
php artisan crudmaster:make Post
bash
php artisan test

src/
├── Commands/
├── Generators/
├── Responses/
├── Stubs/
├── Helpers/
├── CrudMasterServiceProvider.php