- Implement EmailNotifier for sending batch and test notifications via email. - Implement TelegramNotifier for sending batch and test notifications via Telegram. - Implement WahaNotifier for sending batch and test notifications via WhatsApp using WAHA API. - Create migration for client_categories table and update clients table to include category_id. - Create migration for notification_settings table to manage notification configurations. - Add ClientCategorySeeder to populate default client categories. - Create manifest.json for PWA support. - Implement service worker (sw.js) for caching static assets and offline support. - Add edit event view for modifying scheduled events. - Create search results view for displaying search queries. - Develop notification settings view for configuring notification channels and triggers.
91 lines
4.7 KiB
PHP
91 lines
4.7 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
use App\Http\Controllers\ClientCategoryController;
|
||
use App\Http\Controllers\ClientController;
|
||
use App\Http\Controllers\ContentBriefController;
|
||
use App\Http\Controllers\DashboardController;
|
||
use App\Http\Controllers\EventController;
|
||
use App\Http\Controllers\InvoiceController;
|
||
use App\Http\Controllers\MediaFileController;
|
||
use App\Http\Controllers\NotificationSettingController;
|
||
use App\Http\Controllers\RateCardController;
|
||
use App\Http\Controllers\SearchController;
|
||
use App\Http\Controllers\SocialHubController;
|
||
use Illuminate\Support\Facades\Route;
|
||
|
||
Route::get('/', [DashboardController::class, 'index'])->name('dashboard');
|
||
|
||
// CRM – Clients
|
||
Route::resource('clients', ClientController::class);
|
||
|
||
// Client Categories
|
||
Route::prefix('client-categories')->name('client-categories.')->group(function (): void {
|
||
Route::get('/', [ClientCategoryController::class, 'index'])->name('index');
|
||
Route::post('/', [ClientCategoryController::class, 'store'])->name('store');
|
||
Route::put('/{category}', [ClientCategoryController::class, 'update'])->name('update');
|
||
Route::delete('/{category}', [ClientCategoryController::class, 'destroy'])->name('destroy');
|
||
});
|
||
|
||
// Schedule & Calendar
|
||
Route::prefix('schedule')->name('schedule.')->group(function (): void {
|
||
Route::get('/', [EventController::class, 'index'])->name('index');
|
||
Route::post('/', [EventController::class, 'store'])->name('store');
|
||
Route::get('/{event}/edit', [EventController::class, 'edit'])->name('edit');
|
||
Route::put('/{event}', [EventController::class, 'update'])->name('update');
|
||
Route::patch('/{event}/dates', [EventController::class, 'updateDates'])->name('update-dates');
|
||
Route::delete('/{event}', [EventController::class, 'destroy'])->name('destroy');
|
||
Route::get('/api/events', [EventController::class, 'apiList'])->name('api-events');
|
||
});
|
||
|
||
// Social Media Hub
|
||
Route::prefix('social-hub')->name('social-hub.')->group(function (): void {
|
||
Route::get('/', [SocialHubController::class, 'index'])->name('index');
|
||
Route::post('/stats', [SocialHubController::class, 'storeStats'])->name('store-stats');
|
||
});
|
||
|
||
// Financial – Invoices
|
||
Route::resource('invoices', InvoiceController::class);
|
||
Route::get('/invoices/{invoice}/pdf', [InvoiceController::class, 'pdf'])->name('invoices.pdf');
|
||
|
||
// Financial – Rate Cards
|
||
Route::get('/rate-cards/public', [RateCardController::class, 'public'])->name('rate-cards.public');
|
||
Route::resource('rate-cards', RateCardController::class)->except(['show']);
|
||
|
||
// Content Strategy – Kanban
|
||
Route::prefix('content')->name('content.')->group(function (): void {
|
||
Route::get('/', [ContentBriefController::class, 'index'])->name('index');
|
||
Route::get('/create', [ContentBriefController::class, 'create'])->name('create');
|
||
Route::post('/', [ContentBriefController::class, 'store'])->name('store');
|
||
Route::get('/{contentBrief}', [ContentBriefController::class, 'show'])->name('show');
|
||
Route::get('/{contentBrief}/edit', [ContentBriefController::class, 'edit'])->name('edit');
|
||
Route::put('/{contentBrief}', [ContentBriefController::class, 'update'])->name('update');
|
||
Route::delete('/{contentBrief}', [ContentBriefController::class, 'destroy'])->name('destroy');
|
||
Route::patch('/{contentBrief}/status', [ContentBriefController::class, 'updateStatus'])->name('update-status');
|
||
});
|
||
|
||
// File Management
|
||
Route::prefix('files')->name('files.')->group(function (): void {
|
||
Route::get('/', [MediaFileController::class, 'index'])->name('index');
|
||
Route::post('/', [MediaFileController::class, 'store'])->name('store');
|
||
Route::get('/{mediaFile}/serve', [MediaFileController::class, 'serve'])->name('serve');
|
||
Route::delete('/{mediaFile}', [MediaFileController::class, 'destroy'])->name('destroy');
|
||
});
|
||
|
||
// Global Search
|
||
Route::prefix('search')->name('search.')->group(function (): void {
|
||
Route::get('/', [SearchController::class, 'index'])->name('index');
|
||
Route::get('/quick', [SearchController::class, 'quick'])->name('quick');
|
||
});
|
||
|
||
// Settings
|
||
Route::prefix('settings')->name('settings.')->group(function (): void {
|
||
Route::get('/notifications', [NotificationSettingController::class, 'index'])->name('notifications');
|
||
Route::post('/notifications', [NotificationSettingController::class, 'store'])->name('notifications.store');
|
||
Route::put('/notifications/{setting}', [NotificationSettingController::class, 'update'])->name('notifications.update');
|
||
Route::delete('/notifications/{setting}', [NotificationSettingController::class, 'destroy'])->name('notifications.destroy');
|
||
Route::post('/notifications/{setting}/test', [NotificationSettingController::class, 'test'])->name('notifications.test');
|
||
Route::post('/notifications/{setting}/toggle', [NotificationSettingController::class, 'toggle'])->name('notifications.toggle');
|
||
});
|