# 🌟 Laravel Project Installation Guide
Welcome to our Laravel project, MyPPMB!
Follow this guide to set up and run our application locally with ease.
Ensure your system has the following:
- ✅ **PHP** 8.1 or higher
- ✅ **Composer** (Dependency Manager)
- ✅ **MySQL** (Database Server)
- ✅ **Git** (Version Control)
- ✅ **Web Browser** (For accessing the application)
To get started, clone the repository to your local machine and navigate into the project directory:
```bash
git clone https://github.com/username/my-laravel-project.git
cd my-laravel-project
Install the required dependencies using Composer:
composer install
Next, configure the environment file. Copy .env.example
to .env
using:
cp .env.example .env
Then, edit the .env
file with your database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_project
DB_USERNAME=root
DB_PASSWORD=your_password
Create an empty database in MySQL. Using MySQL Workbench, create a database named laravel_project
. Alternatively, use the CLI:
CREATE DATABASE laravel_project;
Run the migrations to create the database tables:
php artisan migrate
Next, seed the database with initial data:
php artisan db:seed
Generate the application encryption key:
php artisan key:generate
Finally, start the Laravel development server:
php artisan serve
Open the application in your browser at:
http://127.0.0.1:8000
If you encounter issues during setup, ensure the credentials in .env
match your database setup, and all dependencies are installed using composer install
. For configuration cache issues, clear it using:
php artisan config:clear
If tests are included in the project, run them with:
php artisan test
The project structure includes:
my-laravel-project/
├── app/ # Core application files
├── bootstrap/ # Application bootstrap files
├── config/ # Configuration files
├── database/
│ ├── migrations/ # Table structure definitions
│ ├── seeders/ # Data seeder files
├── public/ # Public assets (e.g., CSS, JS)
├── resources/ # Views, assets, blade templates
├── routes/ # Web and API route files
├── storage/ # Cache, logs, file uploads
├── .env # Environment configuration file
├── composer.json # Dependencies definition
└── README.md # User guide
Key commands include:
composer install
- Install project dependencies.php artisan migrate
- Create database tables.php artisan db:seed
- Populate the database with initial data.php artisan serve
- Run the development server.php artisan config:clear
- Clear the configuration cache.
This project is licensed under the MIT License. Enjoy using the Laravel project, and feel free to open an issue on the repository if you encounter any problems! 🎉