2026-07-18 14:35:53 +03:00
|
|
|
<?php
|
|
|
|
|
|
2026-07-21 12:46:50 +03:00
|
|
|
use App\Livewire\Auth\Login;
|
2026-07-18 17:13:50 +03:00
|
|
|
use App\Livewire\Posts\Index as PostsIndex;
|
2026-07-18 14:57:47 +03:00
|
|
|
use App\Livewire\Sites\Index as SitesIndex;
|
2026-07-18 15:05:55 +03:00
|
|
|
use App\Livewire\SocialAccounts\Index as SocialAccountsIndex;
|
2026-07-27 21:00:41 +03:00
|
|
|
use App\Livewire\Templates\Index as TemplatesIndex;
|
2026-07-21 12:46:50 +03:00
|
|
|
use Illuminate\Support\Facades\Auth;
|
2026-07-18 14:35:53 +03:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
|
|
Route::get('/', function () {
|
|
|
|
|
return view('welcome');
|
|
|
|
|
});
|
2026-07-18 14:57:47 +03:00
|
|
|
|
2026-07-21 12:46:50 +03:00
|
|
|
Route::get('/login', Login::class)->middleware('guest')->name('login');
|
|
|
|
|
|
|
|
|
|
Route::post('/logout', function () {
|
|
|
|
|
Auth::guard('web')->logout();
|
|
|
|
|
request()->session()->invalidate();
|
|
|
|
|
request()->session()->regenerateToken();
|
|
|
|
|
|
|
|
|
|
return redirect('/login');
|
|
|
|
|
})->middleware('auth')->name('logout');
|
|
|
|
|
|
|
|
|
|
Route::middleware('auth')->group(function () {
|
|
|
|
|
Route::get('/sites', SitesIndex::class)->name('sites.index');
|
|
|
|
|
Route::get('/social-accounts', SocialAccountsIndex::class)->name('social-accounts.index');
|
|
|
|
|
Route::get('/posts', PostsIndex::class)->name('posts.index');
|
2026-07-27 21:00:41 +03:00
|
|
|
Route::get('/templates', TemplatesIndex::class)->name('templates.index');
|
2026-07-21 12:46:50 +03:00
|
|
|
});
|