Issues (25)

routes/web.php (1 issue)

Labels
Severity
1
<?php
2
3
/*
4
|--------------------------------------------------------------------------
5
| Web Routes
6
|--------------------------------------------------------------------------
7
|
8
| Here is where you can register web routes for your application. These
9
| routes are loaded by the RouteServiceProvider within a group which
10
| contains the "web" middleware group. Now create something great!
11
|
12
*/
13
14
// homepage route
15
Route::get('/', 'QuizController@showIndexWelcome')->name('welcome');
16
17
// new in laravel 5.3, automatically specifies authentication routes
18
// source code: https://github.com/laravel/framework/blob/5.6/src/Illuminate/Routing/Router.php
19
Route::prefix('host')->group(function() {
20
    Auth::routes();
21
    Route::get('logout', 'Auth\LoginController@logout')->name('logout');
22
    Route::prefix('dashboard')->middleware(['auth'])->group(function() {
23
        Route::get('/', 'QuizController@showHostDashboard')->name('quiz_host.dashboard');
24
        Route::get('quiz/manage', 'QuizController@showHostManageQuizzes')->name('quiz_host.dashboard.manage-quizzes');
25
        Route::get('quiz/create', 'QuizController@create')->name('quiz_host.dashboard.quiz.create');
26
        Route::post('quiz/store', 'QuizController@store')->name('quiz_host.dashboard.quiz.store');
27
        Route::delete('quiz/{id}/delete', 'QuizController@destroy')->name('quiz_host.dashboard.quiz.delete');
28
        Route::post('quiz/{id}/activate', 'QuizController@activate')->name('quiz_host.dashboard.quiz.activate');
29
    });
30
});
31
32
Route::post('pin', 'QuizController@enterQuizPin')->name('pin-enter');
33
34
Route::get('/about', function() {
35
    return view('quiz_user.about');
36
})->name('about');
37
38
// // public routes
39
// Route::middlware(['web', 'activity'])->group(function() {
40
41
//     Route::get('/about', function () {
42
//         return view('quiz_user.about');
43
//     });
44
45
Route::get('/question', 'QuizController@showQuestion')->name('quiz_user.showQuestion');
46
Route::get('/splash', 'QuizController@showSplash')->name('quiz_user.showSplash');
47
Route::get('/pin', 'QuizController@showPin')->name('quiz_user.showPin');
48
Route::get('/leaderboards', 'QuizController@leaderboards')->name('quiz_user.leaderboards');
49
50
Route::get('/quiz/{method}/{pin}', function () {
51
  $pin = request('pin');
52
  $method = request('method');
53
  event(new App\Events\Sockets($pin, $method));
54
  return "event fired.. users should have been redirected for pin: " . $pin;
0 ignored issues
show
Are you sure $pin of type Illuminate\Http\Request|array|string can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

54
  return "event fired.. users should have been redirected for pin: " . /** @scrutinizer ignore-type */ $pin;
Loading history...
55
});
56
57
//Route::get('/pin', 'QuizController@showQuestion')->name('quiz_user.showQuestion');
58
59
//     Route::get('/answer', 'QuizController@showAnswer')->name('quiz_user.showAnswer');
60
61
//     Route::get('/fire', function () {
62
//         event(new App\Events\Sockets());
63
//         return "event fired";
64
//     });
65
66
// });
67
68
// // Registered and activated host user routes
69
// Route::middleware(['auth', 'activated', 'activity'])->group(function() {
70
//     Route::get('activation-required', 'ActivationController@activationRequired')
71
//         ->name('quiz_host.activation-required');
72
73
//     Route::get('/logout', 'Auth\LoginController@logout')->name('quiz_user.logout');
74
// });
75