name('login'); Route::post('/login', [LoginController::class, 'login'])->name('login'); Route::post('/logout', [LoginController::class, 'logout'])->name('logout'); Route::middleware(['auth', 'role:admin|visitor|root'])->group(function () { Route::get('/', [DashboardController::class, 'index'])->name('root'); Route::controller(UserController::class)->group(function () { Route::get('/users', 'index')->name('user.index'); Route::get('/users/{user}/toggle', 'toggle')->name('user.status.toggle'); Route::get('/users/{user}/show', 'show')->name('user.show'); Route::get('/users/{user}/edit', 'edit')->name('user.edit'); Route::post('/users/{user}/update', 'update')->name('user.update'); Route::get('/users/{user}/delete', 'delete')->name('user.delete'); }); Route::controller(CategoryController::class)->group(function () { Route::get('/categories', 'index')->name('category.index'); Route::get('/categories/create', 'create')->name('category.create'); Route::post('/categories/store', 'store')->name('category.store'); Route::get('/categories/{category}/edit', 'edit')->name('category.edit'); Route::post('/categories/{category}/update', 'update')->name('category.update'); Route::get('/categories/{category}/toggle', 'toggle')->name('category.status.toggle'); Route::get('/categories/{category}/delete', 'delete')->name('category.delete'); Route::get('/categories/{category}/tree', 'getAlbams')->name('category.tree'); Route::post('/categories-albam/{category}/update', 'updateAlbum')->name('category.tree.update'); }); Route::controller(ShiftController::class)->group(function () { Route::get('/shifts', 'index')->name('shift.index'); Route::get('/shifts/{shift}/toggle', 'toggle')->name('shift.status.toggle'); Route::get('/shifts/{shift}/delete', 'delete')->name('shift.delete'); Route::get('/shift/{shift}/tree', 'getAlbams')->name('shift.tree'); Route::post('/shift-albam/{shift}/update', 'updateAlbum')->name('shift.tree.update'); }); Route::controller(BannerController::class)->group(function () { Route::get('/banners', 'index')->name('banner.index'); Route::get('/banners/create', 'create')->name('banner.create'); Route::post('/banners/store', 'store')->name('banner.store'); Route::get('/banners/{banner}/edit', 'edit')->name('banner.edit'); Route::post('/banners/{banner}/update', 'update')->name('banner.update'); Route::get('/banners/{banner}/toggle', 'toggle')->name('banner.status.toggle'); Route::get('/banners/{banner}/delete', 'delete')->name('banner.delete'); }); Route::get('/getAlbam', [APIAlbamController::class, 'index']); Route::controller(AlbamController::class)->group(function () { Route::get('/albames', 'index')->name('albam.index'); Route::get('/albames/create', 'create')->name('albam.create'); Route::post('/albames/store', 'store')->name('albam.store'); Route::get('/albames/{albam}/edit', 'edit')->name('albam.edit'); Route::post('/albames/{albam}/update', 'update')->name('albam.update'); Route::get('/albames/{albam}/toggle', 'toggle')->name('albam.status.toggle'); Route::get('/albames/{albam}/paid', 'updatePaidStatus')->name('albam.paid.toggle'); Route::get('/albames/{albam}/delete', 'delete')->name('albam.delete'); Route::get('/albames/{albam}/tree', 'getPlaylist')->name('albam.tree'); Route::post('/albames-playlist/{albam}/update', 'updatePlaylist')->name('albam.tree.update'); }); Route::controller(PlaylistController::class)->group(function () { Route::get('/playlists', 'index')->name('playlist.index'); Route::get('/playlists/create', 'create')->name('playlist.create'); Route::post('/playlists/store', 'store')->name('playlist.store'); Route::get('/playlists/{playlist}/edit', 'edit')->name('playlist.edit'); Route::post('/playlists/{playlist}/update', 'update')->name('playlist.update'); Route::get('/playlists/{playlist}/toggle', 'toggle')->name('playlist.status.toggle'); Route::get('/playlists/{playlist}/paid', 'updatePaidStatus')->name('playlist.paid.toggle'); Route::get('/playlists/{playlist}/show', 'show')->name('playlist.show'); Route::get('/playlists/{playlist}/delete', 'delete')->name('playlist.delete'); Route::get('/playlists/{playlist}/read-more', 'readmore')->name('playlist.readmore'); Route::put('/playlists/{playlist}/readmore-update', 'readmoreUpdate')->name('playlist.readmore.update'); }); Route::get('/web-setting', [WebSettingController::class, 'index'])->name(('webSetting.index')); Route::post('/web-setting/{webSetting?}', [WebSettingController::class, 'update'])->name(('webSetting.update')); Route::get('/web-setting-toggle/{webSetting?}', [WebSettingController::class, 'toggle'])->name(('webSetting.toggle')); Route::get('/web-setting-toggle-ads/{webSetting?}', [WebSettingController::class, 'AdsToggle'])->name(('webSetting.toggle.ads')); //Profile Route::get('/profile', [ProfileController::class, 'index'])->name('profile.index'); Route::post('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::get('/profile-edit', [ProfileController::class, 'edit'])->name('profile.edit'); Route::post('/profile/change-password', [ProfileController::class, 'changePassword'])->name('profile.change-password'); Route::get('/profile/change-password', function () { return view('profile.change-password'); })->name('profile.change-password'); Route::controller(SubscriptionPlanController::class)->group(function () { Route::get('/subscription-plans', 'index')->name('subscriptionPlan.index'); Route::get('/subscription-plans/create', 'create')->name('subscriptionPlan.create'); Route::post('/subscription-plans/store', 'store')->name('subscriptionPlan.store'); Route::get('/subscription-plans/{subscriptionPlan}/edit', 'edit')->name('subscriptionPlan.edit'); Route::post('/subscription-plans/{subscriptionPlan}/update', 'update')->name('subscriptionPlan.update'); Route::get('/subscription-plans/{subscriptionPlan}/toggle', 'toggle')->name('subscriptionPlan.status.toggle'); Route::get('/subscription-plans/{subscriptionPlan}/show', 'show')->name('subscriptionPlan.show'); Route::get('/subscription-plans/{subscriptionPlan}/delete', 'delete')->name('subscriptionPlan.delete'); }); Route::controller(SettingController::class)->group(function () { Route::get('/settings/{slug}', 'show')->name('setting.show'); Route::get('/settings/{slug}/edit', 'edit')->name('setting.edit'); Route::put('/settings/{setting}', 'update')->name('setting.update'); }); // Notifications Route::controller(NotificationController::class)->group(function(){ Route::get('/notifications', 'index')->name('notification.index'); Route::post('/send-notifications', 'sendNotification')->name('notification.send'); }); // mail configuration Route::controller(MailConfigurationController::class)->group(function () { Route::get('/mail-configuration', 'index')->name('mailConfig.index'); Route::put('/mail-configuration', 'update')->name('mailConfig.update'); }); // fcm configuration Route::controller(FCMController::class)->group(function () { Route::get('/firebase-cloud-messaging', 'index')->name('fcm.index'); Route::put('/firebase-cloud-messaging', 'update')->name('fcm.update'); }); }); Route::get('email-verify/{userId}/{token}', [EmailVerifyController::class, 'verify'])->name('email-verify'); Route::get('/notification-data', [NotificationController::class, 'userFilters'])->name('notification.filter');