updated various snippets
This commit is contained in:
@ -1,20 +1,25 @@
|
||||
<snippet>
|
||||
<content><![CDATA[
|
||||
Route::get('/${1:route}', [${3:controller}Controller::class, 'index'])->name('dashboard.${1:route}.index');
|
||||
Route::get('/${1:route}/create', [${3:controller}Controller::class, 'create'])->name('dashboard.${1:route}.create');
|
||||
Route::post('/${1:route}', [${3:controller}Controller::class, 'store'])->name('dashboard.${1:route}.store');
|
||||
Route::get('/${1:route}/{${2:model}}', [${3:controller}Controller::class, 'show'])
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.show');
|
||||
Route::get('/${1:route}/{${2:model}}/edit', [${3:controller}Controller::class, 'edit'])
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.edit');
|
||||
Route::post('/${1:route}/{${2:model}}', [${3:controller}Controller::class, 'update'])
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.update');
|
||||
Route::delete('/${1:route}/{${2:model}}', [${3:controller}Controller::class, 'destroy'])
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.destroy');
|
||||
Route::controller(${3:controller}Controller::class)->group(function () {
|
||||
Route::get('/${1:route}', 'index')
|
||||
->name('dashboard.${1:route}.index');
|
||||
Route::get('/${1:route}/create', 'create')
|
||||
->name('dashboard.${1:route}.create');
|
||||
Route::post('/${1:route}', 'store')
|
||||
->name('dashboard.${1:route}.store');
|
||||
Route::get('/${1:route}/{${2:model}}', 'show')
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.show');
|
||||
Route::get('/${1:route}/{${2:model}}/edit', 'edit')
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.edit');
|
||||
Route::post('/${1:route}/{${2:model}}', 'update')
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.update');
|
||||
Route::delete('/${1:route}/{${2:model}}', 'destroy')
|
||||
->where('${2:model}', '[0-9]+')
|
||||
->name('dashboard.${1:route}.destroy');
|
||||
});
|
||||
]]></content>
|
||||
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
|
||||
<tabTrigger>lararoutes</tabTrigger>
|
||||
|
Reference in New Issue
Block a user