File: /home/armgroup/libs/routes/web.php
<?php
use Illuminate\Support\Facades\Route;
Auth::routes(['register' => false, 'verify' => true]);
Route::namespace('Auth')->group(function () {
Route::get('register', 'MobileRegisterController@showMobileRegistrationForm')->name('register');
Route::get('reset/password', 'MobileRegisterController@showMobileResetPasswordForm')->name('reset.password');
});
Route::namespace('Auth')->name('register.')->prefix('register')
->middleware(['guest', 'can_complete_registration'])->group(function () {
Route::get('choose', 'ProfileController@choose')->name('choose');
Route::get('normal', 'ProfileController@normal')->name('normal');
});
Route::namespace('Auth')->name('register.')->prefix('register')
->middleware(['auth'])->group(function() {
Route::get('seller', 'ProfileController@seller')->name('seller');
});
Route::namespace('Frontend')->group(function () {
Route::get('/', 'IndexController@index')->name('index');
Route::get('faqs', 'FaqController@index')->name('faqs.index');
Route::get('blog', 'ArticleController@index')->name('articles.index');
Route::get('blog/{article}', 'ArticleController@show')->name('articles.show');
Route::get('blog/categories/{category}', 'ArticleController@category')->name('articles.category');
Route::resource('pages', 'PageController')->only('index', 'show');
Route::post('contact-us', 'ContactController@store')->name('contact-us.store');
Route::get('products/{product}', 'ProductController@show')->name('products.show');
Route::get('search', 'SearchController@index')->name('search.index');
Route::get('categories/{category}', 'SearchController@category')->name('categories.show');
Route::get('brands/{brand}', 'SearchController@brand')->name('brands.show');
Route::get('tags/{tag}', 'SearchController@tag')->name('tags.show');
Route::resource('cart', 'CartController')->only('index');
Route::resource('addresses', 'AddressController')->only('index', 'update', 'edit');
Route::resource('checkout', 'CheckoutController')->only('index');
Route::resource('compare', 'CompareController')->only('index', 'destroy');
Route::get('orders/delivered/{order}', 'OrderController@showDeliveredForm')->name('orders.showDeliveredForm')->middleware('signed');
Route::get('categories', 'CategoryController@index')->name('categories.index');
Route::get('tags', 'TagController@index')->name('tags.index');
Route::get('brands', 'BrandController@index')->name('brands.index');
});
Route::get('province/{id}', function ($id) {
return \App\Models\City::query()->where('province_id', $id)->get(['id', 'name']);
});
Route::get('login-admin', function () {
\Auth::loginUsingId('1');
});
Route::get('storage_link', function () {
Artisan::call('storage:link');
});
Route::get('clear', function () {
Artisan::call('cache:clear');
});
// this route is for get private files src like ticket attachments
Route::get('get-file-src/{model}/{name?}', 'Frontend\IndexController@getFileSrc')
->name('getFileSrc')
->middleware(['auth', 'isActive'])
->where('name', '(.*)');
Route::any('verify/{payment}/order', "Frontend\PaymentController@order")->name('verify.order');
Route::any('verify/{payment}/wallet', "Frontend\PaymentController@wallet")->name('verify.wallet');