PHP code example of ahmed-aliraqi / artisan-scaffolding

1. Go to this page and download the library: Download ahmed-aliraqi/artisan-scaffolding 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/ */

    

ahmed-aliraqi / artisan-scaffolding example snippets


// config/app.php
'providers' => [
    ...
    Aliraqi\Artisan\Scaffolding\Providers\ServiceProvider::class,
];

php artisan vendor:publish --provider=Aliraqi\Artisan\Scaffolding\Providers\ServiceProvider --tag=config

// config/artisan-scaffolding.php


return [
    /**
     * the default namespace for the models classes.
     *
     * if you change the default namespace you need to change user model namespace in these files :-
     * - config/auth.php
     * - config/services.php
     * - app/Http/Controllers/Auth/RegisterController.php
     * - database/factories/ModelFactory.php
     *
     */
    'models_default_namespace' => 'App',

    /**
     * the default namespace for the relations traits.
     *
     */
    'relations_default_namespace' => 'App\Relations',

    /**
     * the default namespace for the concerns traits.
     *
     */
    'concerns_default_namespace' => 'App\Concerns',

    /**
     * the default namespace for the mutators traits.
     *
     */
    'mutators_default_namespace' => 'App\Mutators',

    /**
     * the default namespace for the scopes traits.
     *
     */
    'scopes_default_namespace' => 'App\Scopes',

    /**
     * the default namespace for the helpers traits.
     *
     */
    'helpers_default_namespace' => 'App\Helpers',

    /**
     * the default namespace for the policies classes.
     *
     */
    'policies_default_namespace' => 'App\Policies',

    /**
     * the default namespace for the requests classes.
     *
     */
    'requests_default_namespace' => 'App\Http\Requests',

    /**
     * the default namespace for the controllers classes.
     *
     */
    'controllers_default_namespace' => 'App\Http\Controllers',

    /**
     * the default namespace for the transformer classes.
     *
     */
    'transformers_default_namespace' => 'App\Transformers',
];

php artisan vendor:publish --provider=Aliraqi\Artisan\Scaffolding\Providers\ServiceProvider --tag=stubs