osb/routes/web.php

70 lines
2.9 KiB
PHP
Raw Normal View History

2017-11-03 05:26:07 +00:00
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
2017-11-03 05:26:07 +00:00
|--------------------------------------------------------------------------
|
| 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!
2017-11-03 05:26:07 +00:00
|
*/
2018-07-31 04:11:00 +00:00
Auth::routes();
Route::get('/logout','Auth\LoginController@logout');
2017-12-04 12:37:14 +00:00
// Generic Image Renderer - Render images that we dont have with a generic image
Route::get('image/generic/{width}/{height}/{color}/{name?}','MediaController@image')->name('image');
2018-07-31 04:11:00 +00:00
// Our Admin Routes
Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'prefix'=>'a'], function() {
Route::get('setup','AdminHomeController@setup');
Route::post('setup','AdminHomeController@setup_update');
2018-08-23 05:17:26 +00:00
Route::get('service/{o}', 'AdminHomeController@service');
Route::post('service/{o}', 'AdminHomeController@service_update');
2018-05-20 12:53:14 +00:00
2018-08-07 04:26:33 +00:00
//Route::get('accounting/connect', 'AccountingController@connect');
});
2018-05-20 12:53:14 +00:00
2018-08-01 07:09:38 +00:00
Route::get('admin/switch/stop','\Leenooks\Controllers\AdminController@user_switch_stop')->name('switch.user.start')->middleware('auth');
2018-07-31 04:11:00 +00:00
// Our Reseller Routes
Route::group(['middleware'=>['theme:adminlte-be','auth','role:reseller'],'prefix'=>'r'], function() {
Route::get('supplier/index', 'SuppliersController@index');
Route::get('supplier/create', 'SuppliersController@create');
Route::post('supplier/store', 'SuppliersController@store');
Route::get('switch/start/{id}','\Leenooks\Controllers\AdminController@user_switch_start')->name('switch.user.stop');
//Route::get('home/{o}', 'UserHomeController@user');
2018-07-31 04:11:00 +00:00
});
// Our User Routes
Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'], function() {
Route::get('home', 'UserHomeController@home');
Route::get('account/{o}', 'User\AccountController@view')
->middleware('can:view,o');
Route::get('account/{o}/invoice', 'User\AccountController@view_invoice_next')
->middleware('can:view,o');
Route::get('invoice/{o}', 'UserHomeController@invoice')
->middleware('can:view,o');
Route::get('invoice/{o}/pdf','UserHomeController@invoice_pdf')
->middleware('can:view,o');
Route::get('service/{o}', 'UserHomeController@service')
->middleware('can:view,o');
2018-07-31 04:11:00 +00:00
});
// Frontend Routes (Non-Authed Users)
2018-05-20 12:53:14 +00:00
Route::group(['middleware'=>['theme:metronic-fe']], function() {
Route::get('/', 'WelcomeController@index');
2018-08-09 14:10:51 +00:00
Route::get('order','OrderController@index');
Route::post('order','OrderController@submit');
2018-05-20 12:53:14 +00:00
});
2018-08-09 14:10:51 +00:00
Route::get('product_order/{o}', 'OrderController@product_order');
Route::get('product_info/{o}', 'OrderController@product_info');
2018-07-31 04:11:00 +00:00
Route::redirect('/home','/u/home');
2018-05-20 12:53:14 +00:00
Route::demoAccess('/uc-access');
2018-06-05 22:14:41 +00:00
Route::redirect('/under-construction','http://www.graytech.net.au');
Route::get('/u/{type}/{action}/{id}','UserHomeController@oldsite');
Route::get('/search','SearchController@search');