-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.php
69 lines (50 loc) · 3.29 KB
/
web.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/','HomeController@index')->name('home');
Route::get('/categories','CategoryController@index')->name('categories');
Route::get('/categories/{id}','CategoryController@detail')->name('categories-detail');
Route::get('/details/{id}','DetailController@index')->name('detail');
Route::post('/details/{id}','DetailController@add')->name('detail-add');
Route::post('/checkout/callback','CheckoutController@callback')->name('midtrans-callback');
Route::get('/register/success','Auth\RegisterController@success')->name('register-success');
Route::group(['middleware' => ['auth']], function () {
Route::get('/cart','CartController@index')->name('cart');
Route::delete('/cart/{id}','CartController@delete')->name('cart-delete');
Route::post('/checkout','CheckoutController@process')->name('checkout');
Route::get('/dashboard','DashboardController@index')->name('dashboard');
Route::get('/dashboard/products','DashboardProductController@index')->name('dashboard-product');
Route::get('/dashboard/products/create','DashboardProductController@create')->name('dashboard-product-create');
Route::post('/dashboard/products','DashboardProductController@store')->name('dashboard-product-store');
Route::get('/dashboard/products/{id}','DashboardProductController@details')->name('dashboard-product-details');
Route::post('/dashboard/products/{id}','DashboardProductController@update')->name('dashboard-product-update');
Route::post('/dashboard/products/gallery/upload','DashboardProductController@uploadGallery')->name('dashboard-product-gallery-upload');
Route::get('/dashboard/products/gallery/delete/{id}','DashboardProductController@deleteGallery')->name('dashboard-product-gallery-delete');
Route::get('/dashboard/transactions','DashboardTransactionController@index')->name('dashboard-transaction');
Route::get('/dashboard/transactions/{id}','DashboardTransactionController@details')->name('dashboard-transaction-details');
Route::post('/dashboard/transactions/{id}','DashboardTransactionController@update')->name('dashboard-transaction-update');
Route::get('/dashboard/settings','DashboardSettingController@store')->name('dashboard-settings-store');
Route::get('/dashboard/account','DashboardSettingController@account')->name('dashboard-settings-account');
Route::post('/dashboard/account/{redirect}','DashboardSettingController@update')->name('dashboard-settings-redirect');
});
//->middleware(['auth','admin'])
Route::prefix('admin')
->namespace('Admin')
->middleware(['auth','admin'])
->group(function(){
Route::get('/','DashboardController@index')->name('admin-dashboard');
Route::resource('category', 'CategoryController');
Route::resource('user', 'UserController');
Route::resource('product', 'ProductController');
Route::resource('product-gallery', 'ProductGalleryController');
});
Auth::routes();