StocksNew/routes/web.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

48 lines
1.6 KiB
PHP

<?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';
});