Eshop-Laravel/routes/web.php

64 lines
2.5 KiB
PHP
Raw Permalink Normal View History

2019-10-18 09:25:37 +00:00
<?php
#Shop
Route::prefix('shop')->group(function (){
Route::get('' , 'ShopController@categories');
Route::get('pre-place-order' , 'ShopController@prePlaceOrder');
Route::get('placeorder' , 'ShopController@placeOrder');
Route::get('add-to-cart', 'ShopController@addToCart');
Route::get('checkout' , 'ShopController@checkOut');
Route::get('clearcart' , 'ShopController@clearcart');
Route::get('remove-item/{id}' , 'ShopController@removeItem');
Route::get('{cat_url}' , 'ShopController@product');
Route::get('{cat_url}/{prd_url}' , 'ShopController@item' );
});
#User
// Route::middleware(['signmid'])->group(function (){
Route::prefix('user')->group(function (){
Route::get('customer-orders' , 'UserController@userOrderList');
Route::get('login' , 'UserController@getLogin');
Route::post('login' , 'UserController@postLogin');
Route::get('signup' , 'UserController@getSignup');
Route::post('signup' , 'UserController@postSignup');
Route::get('logout' , 'UserController@logOut');
Route::get('profile', 'UserController@profile');
Route::post('profile' , 'UserController@postProfile');
Route::get('changePass' , 'UserController@changePass');
Route::post('changePass' , 'UserController@postChangePass');
Route::get('order/{oid}' , 'UserController@orderedId');
Route::get('changePic/{uid}' , 'UserController@changePic');
Route::post('changePic/{uid}' , 'UserController@uploadNewPic');
});
// });
#CMS
Route::middleware(['cmsadmin'])->group(function (){
Route::prefix('cms')->group(function (){
Route::get('dashboard' , 'CmsController@home');
Route::get('cms-add-links' , 'CmsController@addLinks');
Route::get('cms-articles' , 'CmsController@articles');
Route::get('cms-charts' , 'CmsController@charts');
Route::get('cms.cms-userInfo/{uid}' , 'CmsController@usersInfo');
Route::post('cms.cms-userInfo/{uid}' , 'CmsController@postUserInfo');
Route::get('getUserOrders/{uid}' , 'CmsController@getUserOrders');
Route::get('getOrderById/{oid}' , 'CmsController@getOrderById');
Route::resource('menu' , 'MenuController');
Route::resource('content' , 'ContentController');
Route::resource('categories' , 'CategoriesController');
Route::resource('products' , 'ProductsController');
});
});
#Pages
Route::get('/','PagesController@home');
Route::get('contact' , 'PagesController@contact');
Route::post('contact' , 'PagesController@postContact');
Route::get('{url}' , 'PagesController@content');
// Route::get('blog' , 'PagesController@blog');
?>