@@ -51,23 +51,25 @@ use Illuminate\Support\Facades\Route;
51
51
|--------------------------------------------------------------------------
52
52
|
53
53
| Here is where you can register web routes for your application. These
54
- | routes are loaded by the RouteServiceProvider within a group which
55
- | contains the "web" middleware group. Now create something great!
54
+ | routes are loaded by the RouteServiceProvider and all of them will
55
+ | be assigned to the "web" middleware group. Make something great!
56
56
|
57
57
*/
58
-
59
- Route::get('/', function () {
60
- return view('welcome');
61
- });
62
58
// [tl! collapse:end]
63
- Route::get('/dashboard', function () {
64
- return view('dashboard');
65
- })->middleware(['auth', 'verified'])->name('dashboard');
59
+ Route::view('/', 'welcome');
66
60
// [tl! add:start]
67
- Route::get('/ chirps', [ChirpController::class, 'index'])
61
+ Route::get('chirps', [ChirpController::class, 'index'])
68
62
->middleware(['auth', 'verified'])
69
63
->name('chirps'); // [tl! add:end]
70
64
65
+ Route::view('dashboard', 'dashboard')
66
+ ->middleware(['auth', 'verified'])
67
+ ->name('dashboard');
68
+
69
+ Route::view('profile', 'profile')
70
+ ->middleware(['auth'])
71
+ ->name('profile');
72
+
71
73
require __DIR__.'/auth.php';
72
74
```
73
75
0 commit comments