FleetCart/Modules/Product/Routes/admin.php

40 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2023-06-11 12:14:03 +00:00
<?php
use Illuminate\Support\Facades\Route;
Route::get('products', [
'as' => 'admin.products.index',
'uses' => 'ProductController@index',
'middleware' => 'can:admin.products.index',
]);
Route::get('products/create', [
'as' => 'admin.products.create',
'uses' => 'ProductController@create',
'middleware' => 'can:admin.products.create',
]);
Route::post('products', [
'as' => 'admin.products.store',
'uses' => 'ProductController@store',
'middleware' => 'can:admin.products.create',
]);
Route::get('products/{id}/edit', [
'as' => 'admin.products.edit',
'uses' => 'ProductController@edit',
'middleware' => 'can:admin.products.edit',
]);
Route::put('products/{id}', [
'as' => 'admin.products.update',
'uses' => 'ProductController@update',
'middleware' => 'can:admin.products.edit',
]);
Route::delete('products/{ids}', [
'as' => 'admin.products.destroy',
'uses' => 'ProductController@destroy',
'middleware' => 'can:admin.products.destroy',
]);