π 1. Create New Laravel Project
Make sure you have:
- PHP 8.2+
- Composer
- Node.js 18+
- MySQL
composer create-project laravel/laravel myapp
cd myappβοΈ 2. Configure Environment
Update .env
APP_NAME="MyApp"
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=myapp_db
DB_USERNAME=root
DB_PASSWORD=yourpasswordCreate database manually:
CREATE DATABASE myapp_db;
Then:
php artisan key:generateπ¨ 3. Install Tailwind + Alpine + Auth (Breeze)
Laravel doesnβt ship with login UI by default anymore. Use Breeze (lightweight, clean).
composer require laravel/breeze --dev
php artisan breeze:installChoose:
Blade
Now install frontend:
npm install
npm run devπ§ What You Just Installed
- Blade templating
- Tailwind CSS
- Alpine.js
- Login / Register / Forgot Password
- Dashboard
- Middleware protection
- Auth scaffolding
Clean and simple. No Jetstream spaceship complexity.
ποΈ 4. Run Migrations
php artisan migrateThis creates:
- users
- password_reset_tokens
- sessions
βΆοΈ 5. Run App
php artisan serveVisit:
http://127.0.0.1:8000
Boom. You now have:
- Register
- Login
- Authenticated dashboard
π Clean Folder Structure (What Matters)
app/
Models/
Http/Controllers/resources/
views/
css/
js/routes/
web.php
π Protect Routes
Example:
Route::middleware(['auth'])->group(function () {
Route::get('/dashboard', function () {
return view('dashboard');
});
});β‘ 6. Production Build
When ready:
npm run buildπ§ Recommended Additions (Professional Setup)
Add Role Column
Migration:
php artisan make:migration add_role_to_users_table$table->string('role')->default('user');Then:
php artisan migrateAdd Global Layout
Edit:
resources/views/layouts/app.blade.php
Add navbar, sidebar, etc.