config project

master
seyedmr 1 year ago
parent 52f5434bab
commit f9f2dd7de8
  1. 2
      config/backpack/base.php
  2. 1
      routes/backpack/custom.php
  3. 15
      routes/web.php

@ -24,7 +24,7 @@ return [
// The prefix used in all base routes (the 'admin' in admin/dashboard) // The prefix used in all base routes (the 'admin' in admin/dashboard)
// You can make sure all your URLs use this prefix by using the backpack_url() helper instead of url() // You can make sure all your URLs use this prefix by using the backpack_url() helper instead of url()
'route_prefix' => 'admin', 'route_prefix' => '',
// The web middleware (group) used in all base & CRUD routes // The web middleware (group) used in all base & CRUD routes
// If you've modified your "web" middleware group (ex: removed sessions), you can use a different // If you've modified your "web" middleware group (ex: removed sessions), you can use a different

@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Route;
// Routes you generate using Backpack\Generators will be placed here. // Routes you generate using Backpack\Generators will be placed here.
Route::group([ Route::group([
'domain' => env('APP_ENV') == 'local' ? 'admin.namaka.loc' : 'admin.namaka.ir',
'prefix' => config('backpack.base.route_prefix', 'admin'), 'prefix' => config('backpack.base.route_prefix', 'admin'),
'middleware' => array_merge( 'middleware' => array_merge(
(array) config('backpack.base.web_middleware', 'web'), (array) config('backpack.base.web_middleware', 'web'),

@ -2,21 +2,10 @@
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::domain('{domain}')->group(function (){
Route::get('/', [
\App\Http\Controllers\MenuController::class,
'index'
]);
});
Route::domain('{username}.test.loc')->group(function () { Route::domain(env('APP_ENV') == 'local' ? 'localhost' : 'namaka.ir')->group(function () {
Route::get('/', [ Route::get('/{username}', [
\App\Http\Controllers\MenuController::class, \App\Http\Controllers\MenuController::class,
'index' 'index'
]); ]);
}); });
Route::get('/', [
\App\Http\Controllers\MenuController::class,
'index'
]);

Loading…
Cancel
Save