first commit
This commit is contained in:
47
routes/web.php
Normal file
47
routes/web.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use App\Notifications\HrActionNotification;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Admin\Models\PromotionDemotion;
|
||||
use Modules\User\Http\Controllers\PermissionController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider and all of them will
|
||||
| be assigned to the "web" middleware group. Make something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::withoutMiddleware([\App\Http\Middleware\PermissionMiddleware::class])->group(function () {
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
})->name('welcome');
|
||||
|
||||
Auth::routes();
|
||||
|
||||
Route::get('/initialize-db', function () {
|
||||
OMIS::initDB();
|
||||
});
|
||||
|
||||
Route::get('/generate-permissions', [PermissionController::class, 'generatePermissionFromRoutes'])->name('permission.generatePermissionFromRoutes');
|
||||
Route::get('/dashboard', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
||||
|
||||
Route::get('/notification', function () {
|
||||
auth()->user()->notify(new HrActionNotification('promotion', PromotionDemotion::first(),'You have been promoted'));
|
||||
toastr()->success('Notification sent successfully!');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Route::middleware('auth')->group(function () {
|
||||
|
||||
// require __DIR__ . '/CRUDgenerated/route.branches.php';
|
||||
// require __DIR__ . '/CRUDgenerated/route.vendors.php';
|
||||
// require __DIR__ . '/CRUDgenerated/route.vendortypes.php';
|
||||
|
||||
});
|
Reference in New Issue
Block a user