PHP code example of humans / laravel-singleton-routes
1. Go to this page and download the library: Download humans/laravel-singleton-routes 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/ */
humans / laravel-singleton-routes example snippets
Route::singleton('profile', PasswordController::class);
Route::singleton('accounts.suspension', AccountSuspensionController::class)
->only('show', 'store', 'destroy');
Route::prefix('admin')->as('admin.')->group(function () {
Route::singleton('theme', ThemeController::class)->only('update');
// url => PUT|PATCH /admin/theme
// name => admin.theme.update
});