Add follow system, activity feed, notifications, sitemap, caching, Scout search
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Schedule;
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote');
|
||||
|
||||
Schedule::command('sitemap:generate')->weekly();
|
||||
|
||||
@@ -43,6 +43,31 @@ Route::delete('/lists/{list}', [\App\Http\Controllers\ListController::class, 'de
|
||||
Route::post('/lists/{list}/games', [\App\Http\Controllers\ListController::class, 'addGame'])->name('lists.add-game')->middleware('auth');
|
||||
Route::delete('/lists/{list}/games/{game}', [\App\Http\Controllers\ListController::class, 'removeGame'])->name('lists.remove-game')->middleware('auth');
|
||||
|
||||
// Follow system
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::post('/users/{user:username}/follow', [\App\Http\Controllers\FollowController::class, 'store'])->name('users.follow');
|
||||
Route::delete('/users/{user:username}/follow', [\App\Http\Controllers\FollowController::class, 'destroy'])->name('users.unfollow');
|
||||
});
|
||||
|
||||
// Activity feed
|
||||
Route::get('/activity', [\App\Http\Controllers\ActivityController::class, 'index'])->name('activity.index')->middleware('auth');
|
||||
Route::get('/activity/global', [\App\Http\Controllers\ActivityController::class, 'global'])->name('activity.global');
|
||||
|
||||
// Notifications
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('/notifications', [\App\Http\Controllers\NotificationController::class, 'index'])->name('notifications.index');
|
||||
Route::post('/notifications/{notification}/read', [\App\Http\Controllers\NotificationController::class, 'markRead'])->name('notifications.read');
|
||||
});
|
||||
|
||||
// Sitemap
|
||||
Route::get('/sitemap.xml', function () {
|
||||
$path = public_path('sitemap.xml');
|
||||
if (!file_exists($path)) {
|
||||
abort(404);
|
||||
}
|
||||
return response()->file($path, ['Content-Type' => 'application/xml']);
|
||||
})->name('sitemap');
|
||||
|
||||
// Dashboard (Breeze default, keep for now)
|
||||
Route::get('/dashboard', function () {
|
||||
return redirect()->route('home');
|
||||
|
||||
Reference in New Issue
Block a user