PHP code example of clean-bandits / single-action-resource-controllers-for-laravel

1. Go to this page and download the library: Download clean-bandits/single-action-resource-controllers-for-laravel 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/ */

    

clean-bandits / single-action-resource-controllers-for-laravel example snippets


return [
    /*
     * Specify root namespace where your single action resource controller folder will reside
     */
    'controllers_namespace' => 'App\\Http\\Controllers\\',

    /*
     * This class is responsible for building Resource controllers naming and location.
     * By default they reside inside namespace -> controllers_namespace+resource_name+action,
     * e.g. App\Http\Controllers\Photos\IndexController
     * To take full control of controller namespace creation,
     * you can provide your own class that implements ResourceController
     */
    'resource_controller' => DefaultResourceController::class,
];
 bash
php artisan vendor:publish --provider="CleanBandits\SingleActionResourceControllers\SingleActionResourceControllersProvider" --tag="config"