Responsive Advertisement

Advance ! keep project best way on route in laravel

<?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!
|
*/

/*--------------------- admin panel -------------------------------*/
Route::match(['get','post'],'/','backEnd\AuthController@login');
Route::match(['get','post'],'/admin','backEnd\AuthController@login');
Route::match(['get','post'],'/admin/login','backEnd\AuthController@login');
Route::match(['get','post'],'/admin/forgot-password','backEnd\AuthController@forgot_password');
Route::match(['get','post'],'/admin/set-password/{admin_id}/{security_code}','backEnd\AuthController@set_password');
Route::match(['get','post'],'/user/set-password/{admin_id}/{security_code}','backEnd\AuthController@user_set_password');

// restaurant
Route::match(['get','post'],'/restaurant/login','backEnd\AuthController@restaurantLogin');
Route::get('/password-success','backEnd\AuthController@pw_success');

Route::group(['prefix'=>'admin','middleware'=>'CheckAdminAuth'],function(){
    Route::match(['get','post'],'/dashboard','backEnd\DashboardController@index');
    Route::get('/logout','backEnd\AuthController@logout');
    Route::match(['get','post'],'/profile','backEnd\ProfileController@index');
    Route::match(['get','post'],'/change-password','backEnd\ProfileController@change_password');
    Route::get('/send/credential-email/{user_id}','backEnd\AuthController@sendCredentialEmail');


    // user management
    Route::get('/restraunts','backEnd\userManagement\RestrauntController@index');
    Route::post('/data/restraunts','backEnd\userManagement\RestrauntController@restrauntList');
    Route::post('/data/restraunts/category/{rest_id}','backEnd\userManagement\RestrauntController@categoryListData');

    Route::match(['get','post'],'/restraunt/add','backEnd\userManagement\RestrauntController@add');
    Route::match(['get','post'],'/restraunt/edit/{rest_id}','backEnd\userManagement\RestrauntController@edit');
    Route::match(['get','post'],'/restraunt/delete/{rest_id}','backEnd\userManagement\RestrauntController@delete');

    Route::match(['get','post'],'/restraunt/categoryListDelete/{rest_id}','backEnd\userManagement\RestrauntController@categoryListDelete');

   
    Route::match(['get','post'],'/validate/restraunt-email','backEnd\AuthController@check_admin_email');
    Route::match(['get','post'],'/validate/restraunt-contact','backEnd\AuthController@check_admin_contact');
    Route::get('/restaurant/send-credentials/{admin_id}','backEnd\userManagement\RestrauntController@sendCredentialEmail');
   
    // restaurant category
    Route::match(['get','post'],'/restraunt/category/add/{rest_id}','backEnd\userManagement\RestrauntController@categoryData');

    Route::match(['get','post'],'/restraunt/category/view/{rest_id}','backEnd\userManagement\RestrauntController@categoryViewList');

    // Content management || cusisine
    Route::get('/cuisines','backEnd\contentManagement\CuisinesController@index');
    Route::post('/data/cuisines','backEnd\contentManagement\CuisinesController@cuisinesList');
    Route::match(['get','post'],'/cuisine/add','backEnd\contentManagement\CuisinesController@add');
    Route::match(['get','post'],'/cuisine/edit/{cuisine_id}','backEnd\contentManagement\CuisinesController@edit');
    Route::match(['get','post'],'/cuisine/delete/{cuisine_id}','backEnd\contentManagement\CuisinesController@delete');
    Route::match(['get','post'],'/validate/cuisine','backEnd\contentManagement\CuisinesController@validateCuisineName');

    // Content management || categories categories
    Route::get('/categories','backEnd\contentManagement\CategoriesController@index');
    Route::post('/data/categories','backEnd\contentManagement\CategoriesController@catergoriesList');
    Route::match(['get','post'],'/category/add','backEnd\contentManagement\CategoriesController@add');
    Route::match(['get','post'],'/category/edit/{category_id}','backEnd\contentManagement\CategoriesController@edit');
    Route::match(['get','post'],'/category/delete/{category_id}','backEnd\contentManagement\CategoriesController@delete');
    Route::match(['get','post'],'/validate/category-name','backEnd\contentManagement\CategoriesController@validateCategoryName');
    Route::match(['get','post'],'/category/change-status','backEnd\contentManagement\CategoriesController@changeCategoryStatus');

    // menu items
    Route::get('/menu-items','backEnd\contentManagement\MenuItemsController@index');
    Route::match(['get','post'],'/menu-item/add','backEnd\contentManagement\MenuItemsController@add');

    // restautant panel
    Route::match(['get','post'],'/restaurant-info/update','backEnd\ProfileController@updateOtherInfo');

    //Content Management  || Preparation Time
    Route::get('/preparations','backEnd\contentManagement\PreparationTimeController@index');
    Route::post('/data/preparation','backEnd\contentManagement\PreparationTimeController@preparationList');
    Route::match(['get','post'],'/preparation/add','backEnd\contentManagement\PreparationTimeController@add');
    Route::match(['get','post'],'/preparation/edit/{preparation_id}','backEnd\contentManagement\PreparationTimeController@edit');
    Route::match(['get','post'],'/preparation/delete/{preparation_id}','backEnd\contentManagement\PreparationTimeController@delete');

    //Blog Management  || Blog
    Route::get('/blogs','backEnd\restaurant\BlogController@index');
    Route::post('/data/blog','backEnd\restaurant\BlogController@blogList');
    Route::match(['get','post'],'/blog/add','backEnd\restaurant\BlogController@add');
    Route::match(['get','post'],'/blog/edit/{blog_id}','backEnd\restaurant\BlogController@edit');
    Route::match(['get','post'],'/blog/delete/{blog_id}','backEnd\restaurant\BlogController@delete');

    // Content management || Restaurant Tables
    Route::get('/restaurant/tables','backEnd\contentManagement\RestaurantTableController@index');
    Route::post('/data/tableList','backEnd\contentManagement\RestaurantTableController@tableList');
    Route::match(['get','post'],'/restaurant/table/add','backEnd\contentManagement\RestaurantTableController@add');
    Route::match(['get','post'],'/restaurant/table/edit/{table_id}','backEnd\contentManagement\RestaurantTableController@edit');
    Route::match(['get','post'],'/restaurant/table/delete/{table_id}','backEnd\contentManagement\RestaurantTableController@delete');

    // Tax Management
    Route::get('/restaurant/tax/','backEnd\taxManagement\RestaurantTaxController@index');
    Route::match(['get','post'],'/restaurant/tax/update','backEnd\taxManagement\RestaurantTaxController@edit');
    Route::match(['get','post'],'/restaurant/table/delete/{table_id}','backEnd\taxManagement\RestaurantTaxController@delete');

    // cachier management || cachier
    Route::get('/cashiers','backEnd\restaurant\CashierController@index');
    Route::post('/data/cashier','backEnd\restaurant\CashierController@cashierList');
    Route::match(['get','post'],'/cashier/add','backEnd\restaurant\CashierController@add');
    Route::match(['get','post'],'/cashier/edit/{cashier_id}','backEnd\restaurant\CashierController@edit');
    Route::match(['get','post'],'/cashier/delete/{cashier_id}','backEnd\restaurant\CashierController@delete');
    Route::match(['get','post'],'/validate/cashier-email','backEnd\restaurant\CashierController@checkEmail');
    Route::match(['get','post'],'/validate/cashier/employee-id','backEnd\restaurant\CashierController@check_user_employee_id');
   
    // kitchen management || kitchen
    Route::get('/kitchens','backEnd\restaurant\KitchenController@index');
    Route::post('/data/kitchen','backEnd\restaurant\KitchenController@KitchenList');
    Route::match(['get','post'],'/kitchen/add','backEnd\restaurant\KitchenController@add');
    Route::match(['get','post'],'/kitchen/edit/{kitchen_id}','backEnd\restaurant\KitchenController@edit');
    Route::match(['get','post'],'/kitchen/delete/{kitchen_id}','backEnd\restaurant\KitchenController@delete');
   
    // Customer Management || customer
    Route::get('/customers','backEnd\restaurant\CustomerController@index');
    Route::post('/data/customer','backEnd\restaurant\CustomerController@CustomerList');
    Route::match(['get','post'],'/customer/add','backEnd\restaurant\CustomerController@add');
    Route::match(['get','post'],'/customer/edit/{customer_id}','backEnd\restaurant\CustomerController@edit');
    Route::match(['get','post'],'/customer/delete/{customer_id}','backEnd\restaurant\CustomerController@delete');
});

define('PROJECT_NAME','QuickTapp');
define('AdminProfileBasePath', 'storage/app/public/profile/admin/');
define('RestrauntsProfileBasePath', 'storage/app/public/profile/restraunt/');
define('ContentCategoriesBasePath', 'storage/app/public/categories');
define('RestrauntsProfileCashierBasePath', 'storage/app/public/profile/cashier/');
define('RestrauntsProfileKitchenBasePath', 'storage/app/public/profile/kitchen/');
define('RestrauntsProfileCustomerBasePath', 'storage/app/public/profile/customer/');
define('RestrauntsProfileBlogBasePath', 'storage/app/public/profile/blog/');

define('AdminProfileImgPath', asset('storage/app/public/profile/admin/'));
define('RestrauntsProfileImgPath', asset('storage/app/public/profile/restraunt/'));

define('RestrauntsProfileCashierImgPath', asset('storage/app/public/profile/cashier/'));
define('RestrauntsProfileKitchenImgPath', asset('storage/app/public/profile/kitchen/'));
define('RestrauntsProfileCustomerImgPath', asset('storage/app/public/profile/customer/'));
define('RestrauntsProfileBlogImgPath',  asset('storage/app/public/profile/blog/'));


define('ContentCategoriesImgPath', asset('storage/app/public/categories/'));
define('DefaultImgPath', asset('storage/app/public/system/default.jpg'));
define('NoImagePath', asset('storage/app/public/system/no_img.png'));

define('SystemImgPath',asset('storage/app/public/system/'));
define('SYSTEM_IMG_PATH',asset('storage/app/public/system/'));
define('BACKEND_CSS_PATH',asset('public/backEnd/css'));
define('BACKEND_JS_PATH',asset('public/backEnd/js'));
define('COMMON_ERROR','Something went wrong. Please try again later after sometime');

Post a Comment

0 Comments