PHP code example of yasksalim / magic-generator

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

    

yasksalim / magic-generator example snippets


// config/magic-generator.php
return [
    'stubs_path' => __DIR__ . '/../stubs',

    'paths' => [
        'controller'    => 'app/Http/Controllers',
        'model'         => 'app/Models',
        'livewire'      => 'app/Livewire',
        'views'         => 'resources/views',
        'form_request'  => 'app/Http/Requests',
        'policy'        => 'app/Policies',
    ],

    'defaults' => [
        'success_message'            => 'Record created successfully.',
        'delete_confirmation_message' => 'Are you sure you want to delete this record?',
    ],

    'routes' => [
        'prefix'    => 'magic-generator',
        'middleware' => ['web'],
    ],

    'menu' => [
        'layout_path' => 'resources/views/layouts/contentNavbarLayout.blade.php',
        'enabled'     => false,
    ],
];
bash
php artisan vendor:publish --tag=magic-generator-config
bash
php artisan vendor:publish --tag=magic-generator-stubs