My SMM panel
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

62 řádky
2.0 KiB

  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use App\Http\Controllers\UserController;
  4. use Illuminate\Foundation\Auth\EmailVerificationRequest;
  5. use Illuminate\Http\Request;
  6. use Illuminate\Support\Facades\Auth;
  7. /*
  8. |--------------------------------------------------------------------------
  9. | Web Routes
  10. |--------------------------------------------------------------------------
  11. |
  12. | Here is where you can register web routes for your application. These
  13. | routes are loaded by the RouteServiceProvider within a group which
  14. | contains the "web" middleware group. Now create something great!
  15. |
  16. */
  17. Route::get('/', function () {
  18. if (Auth::check()) {
  19. return redirect('panel');
  20. }
  21. return view('home');
  22. })->name('login');
  23. Route::view('/panel', 'panel')->middleware([ 'auth', 'verified' ])->name('panel');
  24. Route::view('/verify-email',
  25. 'verify-email')->middleware('auth')->name('verification.notice');
  26. Route::get('/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
  27. $request->fulfill();
  28. return redirect('/panel');
  29. })->middleware(['auth', 'signed'])->name('verification.verify');
  30. Route::post('/resend-verification', function (Request $request) {
  31. $request->user()->sendEmailVerificationNotification();
  32. return back()->with('message', 'Verification link sent!');
  33. })->middleware(['auth', 'throttle:6,1'])->name('verification.send');
  34. Route::post('/register', [UserController::class, 'create']);
  35. Route::get('/forgot-password', function () {
  36. return view('request-reset');
  37. })->middleware('guest')->name('password.request');
  38. Route::post('/forgot-passowrd', [UserController::class,
  39. 'forgotPassword'])->middleware('guest')->name('password.email');
  40. Route::get('/reset-password/{token}', function ($token) {
  41. return view('reset-password', ['token' => $token]);
  42. })->middleware('guest')->name('password.reset');
  43. Route::post('/reset-passowrd', [UserController::class,
  44. 'resetPassword'])->middleware('guest');
  45. Route::post('/login', [UserController::class,
  46. 'login']);