This Laravel project modifies the default Laravel UI 4.x authentication flow.
Key Feature:
After user registration, instead of being logged in automatically, users are redirected to the login page.
-
Clone the Repository
git clone https://github.com/rayan2162/Laravel_project_with_auth_template.git cd Laravel_project_with_auth_template
-
Install PHP Dependencies
composer install
-
Copy Environment File & Generate App Key
cp .env.example .env php artisan key:generate
-
Configure Database
-
Create a new database.
-
Update your
.env
file with the correct DB credentials:DB_DATABASE=your_db_name DB_USERNAME=your_username DB_PASSWORD=your_password
-
-
Run Migrations
php artisan migrate
-
(Optional) Install Frontend Dependencies If the project uses front-end assets (e.g., Bootstrap, Vue, etc.):
npm install npm run dev
-
Start the Laravel Development Server
php artisan serve
Visit: http://localhost:8000
- Default Laravel UI 4.x: After registration, the user is automatically logged in and gets access of dashboard.
- This Project: After registration, the user is redirected to the login page instead.
This customization is implemented in RegisterController
by overriding the default register
method.
- PHP 8.1 or higher
- Composer
- MySQL or compatible database
- Node.js & NPM (optional for front-end)
This project is open-source and available under the MIT license.