Package Data | |
---|---|
Maintainer Username: | arifmahmudrana |
Maintainer Contact: | arif_mahmud_rana@hotmail.com (Arif Mahmud Rana) |
Package Create Date: | 2016-02-12 |
Package Last Update: | 2016-02-12 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-29 15:15:54 |
Package Statistics | |
---|---|
Total Downloads: | 18 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
composer require arifmahmudrana/laravel-resource-route-wildcard-alias
Add service providers to providers
array in config/app.php
. Like so:
AriMahmudRana\laravelResourceRouteWildcardAlias\LaravelResourceRouteWildcardAliasServiceProvider::class
and that's it.
Create resource routes with aliases.
Route::group(['middleware' => ['web']], function () {
Route::resource('album.photo.hello', 'PhotoController', ['alias' => ['album' => 'a', 'photo' => 'p', 'hello' => 'h']]);
});
and the output in php artisan route:list
is.
+--------+-----------+------------------------------------+---------------------------+----------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+-----------+------------------------------------+---------------------------+----------------------------------------------+------------+
| | GET|HEAD | / | | Closure | |
| | POST | album/{a}/photo/{p}/hello | album.photo.hello.store | App\Http\Controllers\PhotoController@store | web |
| | GET|HEAD | album/{a}/photo/{p}/hello | album.photo.hello.index | App\Http\Controllers\PhotoController@index | web |
| | GET|HEAD | album/{a}/photo/{p}/hello/create | album.photo.hello.create | App\Http\Controllers\PhotoController@create | web |
| | DELETE | album/{a}/photo/{p}/hello/{h} | album.photo.hello.destroy | App\Http\Controllers\PhotoController@destroy | web |
| | PUT|PATCH | album/{a}/photo/{p}/hello/{h} | album.photo.hello.update | App\Http\Controllers\PhotoController@update | web |
| | GET|HEAD | album/{a}/photo/{p}/hello/{h} | album.photo.hello.show | App\Http\Controllers\PhotoController@show | web |
| | GET|HEAD | album/{a}/photo/{p}/hello/{h}/edit | album.photo.hello.edit | App\Http\Controllers\PhotoController@edit | web |
+--------+-----------+------------------------------------+---------------------------+----------------------------------------------+------------+
Released under the MIT License, see LICENSE.