Skip to content

Commit d6257a6

Browse files
authored
Finishes upgrading bootcamp to Laravel 11 (#73)
* No need to migrate again * Blade missing profile controller * Adds missing entries to inertia docs * Updates images
1 parent bcac4b6 commit d6257a6

File tree

9 files changed

+42
-6
lines changed

9 files changed

+42
-6
lines changed

public/img/screenshots/fresh-dark.png

476 KB
Loading

public/img/screenshots/fresh.png

482 KB
Loading

resources/docs/blade/creating-chirps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ We are also going to place these routes behind two [middleware](https://laravel.
4646
<?php
4747

4848
use App\Http\Controllers\ChirpController;// [tl! add]
49+
use App\Http\Controllers\ProfileController;
4950
use Illuminate\Support\Facades\Route;
5051

5152
Route::get('/', function () {
@@ -56,6 +57,12 @@ Route::get('/dashboard', function () {
5657
return view('dashboard');
5758
})->middleware(['auth', 'verified'])->name('dashboard');
5859

60+
Route::middleware('auth')->group(function () {
61+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
62+
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
63+
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
64+
});
65+
5966
Route::resource('chirps', ChirpController::class)// [tl! add:start]
6067
->only(['index', 'store'])
6168
->middleware(['auth', 'verified']);// [tl! add:end]

resources/docs/blade/deleting-chirps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ We'll start again by updating our routes to enable the `chirps.destroy` route:
1414
<?php
1515
// [tl! collapse:start]
1616
use App\Http\Controllers\ChirpController;
17+
use App\Http\Controllers\ProfileController;
1718
use Illuminate\Support\Facades\Route;
1819

1920
Route::get('/', function () {
@@ -23,6 +24,12 @@ Route::get('/', function () {
2324
Route::get('/dashboard', function () {
2425
return view('dashboard');
2526
})->middleware(['auth'])->name('dashboard');
27+
28+
Route::middleware('auth')->group(function () {
29+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
30+
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
31+
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
32+
});
2633
// [tl! collapse:end]
2734
Route::resource('chirps', ChirpController::class)
2835
->only(['index', 'store', 'edit', 'update'])// [tl! remove]

resources/docs/blade/editing-chirps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ First we will update our routes file to enable the `chirps.edit` and `chirps.upd
1212
<?php
1313
// [tl! collapse:start]
1414
use App\Http\Controllers\ChirpController;
15+
use App\Http\Controllers\ProfileController;
1516
use Illuminate\Support\Facades\Route;
1617

1718
Route::get('/', function () {
@@ -21,6 +22,12 @@ Route::get('/', function () {
2122
Route::get('/dashboard', function () {
2223
return view('dashboard');
2324
})->middleware(['auth', 'verified'])->name('dashboard');
25+
26+
Route::middleware('auth')->group(function () {
27+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
28+
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
29+
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
30+
});
2431
// [tl! collapse:end]
2532
Route::resource('chirps', ChirpController::class)
2633
->only(['index', 'store'])// [tl! remove]

resources/docs/inertia/creating-chirps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ We are also going to place these routes behind two [middleware](https://laravel.
4646
<?php
4747

4848
use App\Http\Controllers\ChirpController;// [tl! add]
49+
use App\Http\Controllers\ProfileController;
4950
use Illuminate\Foundation\Application;
5051
use Illuminate\Support\Facades\Route;
5152
use Inertia\Inertia;
@@ -63,6 +64,12 @@ Route::get('/dashboard', function () {
6364
return Inertia::render('Dashboard');
6465
})->middleware(['auth', 'verified'])->name('dashboard');
6566

67+
Route::middleware('auth')->group(function () {
68+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
69+
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
70+
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
71+
});
72+
6673
Route::resource('chirps', ChirpController::class)// [tl! add:start]
6774
->only(['index', 'store'])
6875
->middleware(['auth', 'verified']);// [tl! add:end]

resources/docs/inertia/deleting-chirps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ We'll start again by updating our routes to enable the `chirps.destroy` route:
1414
<?php
1515
// [tl! collapse:start]
1616
use App\Http\Controllers\ChirpController;
17+
use App\Http\Controllers\ProfileController;
1718
use Illuminate\Foundation\Application;
1819
use Illuminate\Support\Facades\Route;
1920
use Inertia\Inertia;
@@ -30,6 +31,12 @@ Route::get('/', function () {
3031
Route::get('/dashboard', function () {
3132
return Inertia::render('Dashboard');
3233
})->middleware(['auth', 'verified'])->name('dashboard');
34+
35+
Route::middleware('auth')->group(function () {
36+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
37+
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
38+
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
39+
});
3340
// [tl! collapse:end]
3441
Route::resource('chirps', ChirpController::class)
3542
->only(['index', 'store', 'update'])// [tl! remove]

resources/docs/inertia/editing-chirps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ First we will update our routes file to enable the `chirps.update` route for our
1212
<?php
1313
// [tl! collapse:start]
1414
use App\Http\Controllers\ChirpController;
15+
use App\Http\Controllers\ProfileController;
1516
use Illuminate\Foundation\Application;
1617
use Illuminate\Support\Facades\Route;
1718
use Inertia\Inertia;
@@ -28,6 +29,12 @@ Route::get('/', function () {
2829
Route::get('/dashboard', function () {
2930
return Inertia::render('Dashboard');
3031
})->middleware(['auth', 'verified'])->name('dashboard');
32+
33+
Route::middleware('auth')->group(function () {
34+
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
35+
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
36+
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
37+
});
3138
// [tl! collapse:end]
3239
Route::resource('chirps', ChirpController::class)
3340
->only(['index', 'store'])// [tl! remove]

resources/docs/livewire/installation.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ composer require laravel/breeze --dev
8888
php artisan breeze:install livewire-functional
8989
```
9090

91-
Finally, open another terminal in your `chirper` project directory and run the initial database migrations to populate the database with the default tables from Laravel and Breeze:
92-
93-
```shell
94-
php artisan migrate
95-
```
96-
9791
Now, we just need to start the Vite development server to automatically recompile our CSS and refresh the browser when we make changes to our Blade templates:
9892

9993
```shell

0 commit comments

Comments
 (0)