Skip to content

Commit

Permalink
upgraded to Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
dcblogdev committed Mar 20, 2024
1 parent aa54484 commit 28ce411
Show file tree
Hide file tree
Showing 145 changed files with 1,218 additions and 3,679 deletions.
47 changes: 26 additions & 21 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

Expand All @@ -15,22 +26,29 @@ DB_CONNECTION=sqlite
# DB_USERNAME=root
# DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Expand All @@ -43,17 +61,4 @@ AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function store(LoginRequest $request): RedirectResponse

$request->session()->regenerate();

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended(route('dashboard'));
}

public function destroy(Request $request): RedirectResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public function store(Request $request): RedirectResponse

$request->session()->put('auth.password_confirmed_at', time());

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended(route('dashboard'));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class EmailVerificationNotificationController extends Controller
public function store(Request $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended(route('dashboard'));
}

$request->user()->sendEmailVerificationNotification();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EmailVerificationPromptController extends Controller
public function __invoke(Request $request): RedirectResponse|View
{
return $request->user()->hasVerifiedEmail()
? redirect()->intended(RouteServiceProvider::HOME)
? redirect()->intended(route('dashboard'))
: view('auth::verify-email');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public function store(Request $request): RedirectResponse

Auth::login($user);

return redirect(RouteServiceProvider::HOME);
return to_route('dashboard');
}
}
4 changes: 2 additions & 2 deletions Modules/Auth/App/Http/Controllers/VerifyEmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class VerifyEmailController extends Controller
public function __invoke(EmailVerificationRequest $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
return redirect()->intended(route('dashboard').'?verified=1');
}

if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}

return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
return redirect()->intended(route('dashboard').'?verified=1');
}
}
5 changes: 2 additions & 3 deletions Modules/Auth/Tests/Feature/AuthenticationTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?php

use App\Models\User;
use App\Providers\RouteServiceProvider;
use Tests\TestCase;

use function Pest\Laravel\assertAuthenticated;
use function Pest\Laravel\assertGuest;
use function Pest\Laravel\get;
use function Pest\Laravel\post;

uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('login screen can be rendered', function () {
get('/login')->assertOk();
Expand All @@ -21,7 +20,7 @@
post('/login', [
'email' => $user->email,
'password' => 'password',
])->assertRedirect(RouteServiceProvider::HOME);
])->assertRedirect(route('dashboard'));

assertAuthenticated();
});
Expand Down
5 changes: 2 additions & 3 deletions Modules/Auth/Tests/Feature/EmailVerificationTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?php

use App\Models\User;
use App\Providers\RouteServiceProvider;
use Illuminate\Auth\Events\Verified;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\URL;
use Tests\TestCase;

//uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('email verification screen can be rendered', function () {
$user = User::factory()->create([
Expand Down Expand Up @@ -36,7 +35,7 @@

Event::assertDispatched(Verified::class);
expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
$response->assertRedirect(RouteServiceProvider::HOME.'?verified=1');
$response->assertRedirect(route('dashboard').'?verified=1');
});

test('email is not verified with invalid hash', function () {
Expand Down
2 changes: 1 addition & 1 deletion Modules/Auth/Tests/Feature/PasswordConfirmationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use App\Models\User;
use Tests\TestCase;

//uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('confirm password screen can be rendered', function () {
$user = User::factory()->create();
Expand Down
2 changes: 1 addition & 1 deletion Modules/Auth/Tests/Feature/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\Facades\Notification;
use Tests\TestCase;

//uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('reset password link screen can be rendered', function () {
$response = $this->get('/forgot-password');
Expand Down
2 changes: 1 addition & 1 deletion Modules/Auth/Tests/Feature/PasswordUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Support\Facades\Hash;
use Tests\TestCase;

//uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('password can be updated', function () {
$user = User::factory()->create();
Expand Down
5 changes: 2 additions & 3 deletions Modules/Auth/Tests/Feature/RegistrationTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

use App\Providers\RouteServiceProvider;
use Tests\TestCase;

//uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('registration screen can be rendered', function () {
$response = $this->get('/register');
Expand All @@ -20,5 +19,5 @@
]);

$this->assertAuthenticated();
$response->assertRedirect(RouteServiceProvider::HOME);
$response->assertRedirect(route('dashboard'));
});
5 changes: 1 addition & 4 deletions Modules/Auth/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
"extra": {
"laravel": {
"providers": [],
"aliases": {

}
"aliases": []
}
},
"autoload": {
"psr-4": {
"Modules\\Auth\\": "",
"Modules\\Auth\\App\\": "app/",
"Modules\\Auth\\Database\\Factories\\": "database/factories/",
"Modules\\Auth\\Database\\Seeders\\": "database/seeders/"
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/Base/Tests/Feature/DashboardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use function Pest\Laravel\actingAs;
use function Pest\Laravel\get;

uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('dashboard redirects to login when user is a guest', function () {
get('dashboard')->assertRedirect('login');
Expand Down
5 changes: 1 addition & 4 deletions Modules/Base/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
"extra": {
"laravel": {
"providers": [],
"aliases": {

}
"aliases": []
}
},
"autoload": {
"psr-4": {
"Modules\\Base\\": "",
"Modules\\Base\\App\\": "app/",
"Modules\\Base\\Database\\Factories\\": "database/factories/",
"Modules\\Base\\Database\\Seeders\\": "database/seeders/"
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/Profile/Tests/Feature/ProfileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use function Pest\Laravel\actingAs;

uses(TestCase::class)->in(__DIR__);
uses(TestCase::class);

test('profile page is displayed', function () {
$user = User::factory()->create();
Expand Down
5 changes: 1 addition & 4 deletions Modules/Profile/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
"extra": {
"laravel": {
"providers": [],
"aliases": {

}
"aliases": []
}
},
"autoload": {
"psr-4": {
"Modules\\Profile\\": "",
"Modules\\Profile\\App\\": "app/",
"Modules\\Profile\\Database\\Factories\\": "database/factories/",
"Modules\\Profile\\Database\\Seeders\\": "database/seeders/"
}
Expand Down
67 changes: 65 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
# Breeze Demo
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>

Laravel Modules demo project using Laravel Breeze.
<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>

## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, powerful, and provides tools required for large, robust applications.

## Learning Laravel

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

## Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).

### Premium Partners

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[WebReinvent](https://webreinvent.com/)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

## Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
Loading

0 comments on commit 28ce411

Please sign in to comment.