LaraClub - Create New Project

[1] Create new project

[1.1] Set Quick app tool configuration

We will set laravel creation to use v.11.0.0

We can prepare a few create project statements for different Laravel versions; uncomment only the version 11.0.0

# Laravel

# Laravel=composer create-project laravel/laravel %s --prefer-dist
# Laravel=composer create-project laravel/laravel:^10.3.2 %s --prefer-dist
Laravel=composer create-project laravel/laravel:^11.0.0 %s --prefer-dist

[1.2] Create new Laravel project using Quick app tool.

Laragon downloads Laravel v.11.0.0

Laravel v.11.0 uses sqlite as the default database.

Project creation is done.

Browse the page to check that the server is live.

laraclub.test

localhost/laraclub/public

[2] Install Breeze Package

composer require laravel/breeze:2.0.0

[2.1] Get package

composer require laravel/breeze:2.0.0

[2.2] Install Package

php artisan breeze:install

Specify:

  • Blade stack

  • No for dark mode support

  • 1 for PHPUnit testing framework

Output:

Finally…:

Check that Breeze has been scaffolded successfully.

Login and Register link exist.

Register page exists.

Login page exists.

[2.3] Implement Must Verify Email feature

1. Activate the use statement for MustVerifyEmail:

use Illuminate\Contracts\Auth\MustVerifyEmail;

2. Implements MustVerifyEmail features:

class User extends Authenticatable implements MustVerifyEmail

Edit File C:\laragon\www\laraclub\app\Models\User.php :

[2.4] Run migration

Before you run migration, check whether Laragon has run the statement during project creation.

In step 1.1 above, it looks like migration has been executed.

Anyway, no harm running the command again. Laravel will let you know if there is nothing to migrate.

[2.5] Test Login/Register

Warning: before testing, make sure that …
You have entered details for mail configuration.

Edit File: C:\laragon\www\laraclub\.env :

MAIL_MAILER=smtp
MAIL_HOST=mail.abcdef.my
MAIL_PORT=465
MAIL_USERNAME=abc@def.my
MAIL_PASSWORD=abcd1234
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="admin@abcdef.my"
MAIL_FROM_NAME="${APP_NAME}"

Browse http://laraclub.test/register and register:

Outcome:

Check mailbox:

Click the link. You shall be forwarded to the dashboard page.

Download:

https://archive.org/download/laravelprojects/laraclub_101_20240409.zip