update route
This commit is contained in:
parent
cb0793fde0
commit
9bfae06272
@ -1,25 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Modules\CetakLabel\Http\Controllers\Api\DirectoratController;
|
use Modules\CetakLabel\Http\Controllers\Api\DirectoratController;
|
||||||
use Nwidart\Modules\Facades\Module;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| API Routes
|
| API Routes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here is where you can register API routes for your application. These
|
| Here is where you can register API routes for your application. These
|
||||||
| routes are loaded by the RouteServiceProvider within a group which
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
| is assigned the "api" middleware group. Enjoy building your API!
|
| is assigned the "api" middleware group. Enjoy building your API!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Route::domain('cetaklabel.io')->group(function () {
|
||||||
$module = Module::find('CetakLabel');
|
|
||||||
$domain = config($module->getLowerName() . '.domain');
|
|
||||||
|
|
||||||
Route::domain($domain)->group(function () {
|
|
||||||
Route::middleware('auth:sanctum')->group(function () {
|
Route::middleware('auth:sanctum')->group(function () {
|
||||||
Route::resource('directorats', DirectoratController::class);
|
Route::resource('directorats', DirectoratController::class);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,25 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Web Routes
|
| Web Routes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here is where you can register web routes for your application. These
|
| Here is where you can register web routes for your application. These
|
||||||
| routes are loaded by the RouteServiceProvider within a group which
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
| contains the "web" middleware group. Now create something great!
|
| contains the "web" middleware group. Now create something great!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Modules\CetakLabel\Http\Controllers\DirectoratController;
|
use Modules\CetakLabel\Http\Controllers\DirectoratController;
|
||||||
|
|
||||||
$module = Module::find('CetakLabel');
|
Route::domain('cetaklabel.io')->group(function () {
|
||||||
$domain = config($module->getLowerName() . '.domain');
|
|
||||||
|
|
||||||
Route::domain($domain)->group(function () {
|
|
||||||
Route::group(['middleware' => ['auth', 'verified']], function () {
|
Route::group(['middleware' => ['auth', 'verified']], function () {
|
||||||
Route::resource('directorat', DirectoratController::class);
|
Route::resource('directorat', DirectoratController::class);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user