Skip to content

Commit 67eb995

Browse files
authored
Fixes livewire routing (#55)
1 parent 0d236d3 commit 67eb995

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

resources/docs/livewire/creating-chirps.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,25 @@ use Illuminate\Support\Facades\Route;
5151
|--------------------------------------------------------------------------
5252
|
5353
| 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!
5656
|
5757
*/
58-
59-
Route::get('/', function () {
60-
return view('welcome');
61-
});
6258
// [tl! collapse:end]
63-
Route::get('/dashboard', function () {
64-
return view('dashboard');
65-
})->middleware(['auth', 'verified'])->name('dashboard');
59+
Route::view('/', 'welcome');
6660
// [tl! add:start]
67-
Route::get('/chirps', [ChirpController::class, 'index'])
61+
Route::get('chirps', [ChirpController::class, 'index'])
6862
->middleware(['auth', 'verified'])
6963
->name('chirps'); // [tl! add:end]
7064

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+
7173
require __DIR__.'/auth.php';
7274
```
7375

0 commit comments

Comments
 (0)