Skip to content

Commit 8039f01

Browse files
Merge pull request guillaumebriday#160 from guillaumebriday/laravel-11x
Upgrading to Laravel 11.x
2 parents 2afb2d8 + 6513614 commit 8039f01

40 files changed

+5701
-3464
lines changed

.env.example

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ APP_DEBUG=true
55
APP_URL=http://laravel-blog.test
66
LOG_CHANNEL=stack
77

8-
DB_CONNECTION=mysql
9-
DB_HOST=127.0.0.1
10-
DB_DATABASE=homestead
11-
DB_USERNAME=homestead
12-
DB_PASSWORD=secret
8+
DB_CONNECTION=sqlite
139

1410
BROADCAST_DRIVER=pusher
1511
CACHE_DRIVER=file

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// https://eslint.org/docs/user-guide/configuring
2+
13
module.exports = {
24
env: {
35
browser: true,
@@ -12,7 +14,6 @@ module.exports = {
1214
$: false
1315
},
1416
parserOptions: {
15-
ecmaVersion: 2018,
1617
sourceType: 'module'
1718
},
1819
rules: {

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ public/build/
2020
.phpunit.result.cache
2121
pint.json
2222
storage/media-library/temp
23+
.pnp.*
24+
.yarn/*
25+
!.yarn/patches
26+
!.yarn/plugins
27+
!.yarn/releases
28+
!.yarn/sdks
29+
!.yarn/versions

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Guillaume Briday
3+
Copyright (c) Guillaume Briday
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# Laravel 10.x blog
1+
# Laravel 11.x blog
22

33
The purpose of this repository is to show good development practices on [Laravel](http://laravel.com/) as well as to present cases of use of the framework's features like:
44

5-
- [Authentication](https://laravel.com/docs/10.x/authentication)
5+
- [Authentication](https://laravel.com/docs/11.x/authentication)
66
- API
7-
- [Sanctum](https://laravel.com/docs/10.x/sanctum)
8-
- [API Resources](https://laravel.com/docs/10.x/eloquent-resources)
7+
- [Sanctum](https://laravel.com/docs/11.x/sanctum)
8+
- [API Resources](https://laravel.com/docs/11.x/eloquent-resources)
99
- Versioning
10-
- [Blade](https://laravel.com/docs/10.x/blade)
11-
- [Broadcasting](https://laravel.com/docs/10.x/broadcasting)
12-
- [Cache](https://laravel.com/docs/10.x/cache)
13-
- [Email Verification](https://laravel.com/docs/10.x/verification)
14-
- [Filesystem](https://laravel.com/docs/10.x/filesystem)
15-
- [Helpers](https://laravel.com/docs/10.x/helpers)
16-
- [Horizon](https://laravel.com/docs/10.x/horizon)
17-
- [Localization](https://laravel.com/docs/10.x/localization)
18-
- [Mail](https://laravel.com/docs/10.x/mail)
19-
- [Migrations](https://laravel.com/docs/10.x/migrations)
20-
- [Policies](https://laravel.com/docs/10.x/authorization)
21-
- [Providers](https://laravel.com/docs/10.x/providers)
22-
- [Requests](https://laravel.com/docs/10.x/validation#form-request-validation)
23-
- [Seeding & Factories](https://laravel.com/docs/10.x/seeding)
24-
- [Testing](https://laravel.com/docs/10.x/testing)
25-
- [Homestead](https://laravel.com/docs/10.x/homestead)
10+
- [Blade](https://laravel.com/docs/11.x/blade)
11+
- [Broadcasting](https://laravel.com/docs/11.x/broadcasting)
12+
- [Cache](https://laravel.com/docs/11.x/cache)
13+
- [Email Verification](https://laravel.com/docs/11.x/verification)
14+
- [Filesystem](https://laravel.com/docs/11.x/filesystem)
15+
- [Helpers](https://laravel.com/docs/11.x/helpers)
16+
- [Horizon](https://laravel.com/docs/11.x/horizon)
17+
- [Localization](https://laravel.com/docs/11.x/localization)
18+
- [Mail](https://laravel.com/docs/11.x/mail)
19+
- [Migrations](https://laravel.com/docs/11.x/migrations)
20+
- [Policies](https://laravel.com/docs/11.x/authorization)
21+
- [Providers](https://laravel.com/docs/11.x/providers)
22+
- [Requests](https://laravel.com/docs/11.x/validation#form-request-validation)
23+
- [Seeding & Factories](https://laravel.com/docs/11.x/seeding)
24+
- [Testing](https://laravel.com/docs/11.x/testing)
25+
- [Homestead](https://laravel.com/docs/11.x/homestead)
2626

2727
Beside Laravel, this project uses other tools like:
2828

@@ -41,7 +41,7 @@ You can find some screenshots of the application on : [https://imgur.com/a/Jbnwj
4141

4242
## Installation
4343

44-
To create your development environment [follow these instructions](https://laravel.com/docs/10.x/installation).
44+
To create your development environment [follow these instructions](https://laravel.com/docs/11.x/installation#local-installation-using-herd).
4545

4646
Setting up your development environment on your local machine:
4747
```bash
@@ -54,6 +54,8 @@ $ php artisan telescope:install
5454
$ php artisan storage:link
5555
```
5656

57+
Now open [http://laravel-blog.test](http://laravel-blog.test).
58+
5759
### Mailer
5860

5961
You can use [Mailpit](https://github.com/axllent/mailpit) to test your emails in development.
@@ -63,18 +65,18 @@ Once installed, open [http://localhost:8025](http://localhost:8025).
6365
## Before starting
6466
You need to run the migrations with the seeds :
6567
```bash
66-
$ php artisan migrate --seed
68+
$ php artisan migrate:fresh --seed
6769
```
6870

6971
This will create a new user that you can use to sign in :
7072
```yml
71-
email: darthvader@deathstar.ds
72-
password: 4nak1n
73+
email: demo@demo.com
74+
password: demodemo
7375
```
7476
7577
And then, compile the assets :
7678
```bash
77-
$ yarn dev # or yarn watch
79+
$ yarn dev
7880
```
7981

8082
Starting job for newsletter :

app/Http/Controllers/CommentController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use App\Http\Requests\CommentsRequest;
66
use App\Models\Comment;
7+
use HotwiredLaravel\TurboLaravel\Http\MultiplePendingTurboStreamResponse;
78
use Illuminate\Support\Facades\Auth;
8-
use Tonysm\TurboLaravel\Http\MultiplePendingTurboStreamResponse;
99

1010
class CommentController extends Controller
1111
{

app/Http/Controllers/PostLikeController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace App\Http\Controllers;
44

55
use App\Models\Post;
6+
use HotwiredLaravel\TurboLaravel\Http\MultiplePendingTurboStreamResponse;
67
use Illuminate\Support\Str;
7-
use Tonysm\TurboLaravel\Http\MultiplePendingTurboStreamResponse;
88

9-
use function Tonysm\TurboLaravel\dom_id;
9+
use function HotwiredLaravel\TurboLaravel\dom_id;
1010

1111
class PostLikeController extends Controller
1212
{

app/Http/Kernel.php

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)