Before you begin, ensure that you have the following installed on your system:
- PHP: Version 8.1 or higher
- Composer: Dependency manager for PHP
- Git: To clone the repository
- Database: MySQL
Follow these steps to set up the Laravel 10 project on your local machine:
Clone the repository to your local machine using Git:
git clone <repository-url>
cd <repository-folder>Replace <repository-url> with your Git repository URL and <repository-folder> with the desired folder name.
Run the following command to install PHP dependencies using Composer:
composer installCopy the .env.example file to .env:
cp .env.example .envUpdate the .env file with your local environment settings, such as database credentials.
Run the following command to generate the application key:
php artisan key:generate- Create a new database in your MySQL database management system.
- Update the
.envfile with your database name, username, and password.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_passwordRun the following command to migrate the database schema:
php artisan migrateRun the following command to start the Laravel development server:
php artisan serveThe application will be accessible at http://127.0.0.1:8000.
- Ensure your
.envfile is correctly configured to avoid errors. - For any issues or questions, please open an issue in the repository or contact the project maintainers.