To use on Mamp, you must re-configure the BDD Conifugration on .env ()
Atcually DB_PORT=8889 Because on my mamp MySQL port is 8889
# To start Laravel Server
php artisan serve
# To aliment Database with demonstration Data
php artisan migrate
php artisan db:seed
After you can launch http://127.0.0.1:8000/login
To connect to the app with the User 1 use:
email: guillandnicolas@icloud.com
password: azerty123
To connect to the app with the User 2 use:
email: tompaya@demo.com
password: password123
- Usage of Laravel to facilitate the MVC organisation of the project
-
Models are created to represent entities of the BDD
-
Views are created to display data and interfaces for users (AI used to improve the visuals of views
-
Controllers are created to contains logical and to control interaction between model and view
-
Authentication (AuthController.php) → Manages login, registration and logout.
-
Middleware (RedirectIfAuthenticated.php) → Redirects logged-in users to /tasks when they try to access /login or /register.
-
Protecting Routes (auth middleware) → Ensures tasks pages are accessible only to authenticated users.
-
To the demonstration usage of Seeder to aliment the database with 2 users and many tasks for each user
-
Session Handling (Auth::attempt()) → Logs users in and remembers their session.
-
Logout (Auth::logout()) → Destroys session data.
-
Eloquent ORM → Uses hasMany() and belongsTo() to define relationships between User and Task.
-
Seeders & Factories (php artisan db:seed) → Pre-populate the database for testing and demo purposes.
- Create a new Git repository
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Nic0ooo/UserApp.git
git push -u origin main