PHP code example of sjorsvanleeuwen / laravel-extended-resource-registrar
1. Go to this page and download the library: Download sjorsvanleeuwen/laravel-extended-resource-registrar 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/ */
sjorsvanleeuwen / laravel-extended-resource-registrar example snippets
/**
* Get the route dispatcher callback.
* Do this to make the new Router work
*
* @return \Closure
*/
protected function dispatchToRouter()
{
$this->router = $this->app['router'];
foreach ($this->middlewareGroups as $key => $middleware)
{
$this->router->middlewareGroup($key, $middleware);
}
foreach ($this->routeMiddleware as $key => $middleware)
{
$this->router->aliasMiddleware($key, $middleware);
}
return parent::dispatchToRouter();
}
Sjorsvanleeuwen\ExtendedResourceRegistrar\ServiceProvider::class,
Route::resource('foo', 'FooController')->withSoftDeletes();