This repository contains a Laravel application. The instructions below will guide you through the setup and installation process.
- Requirements
- Installation
- Configuration
- Database Migration & Seeding
- Running the Application
- Testing
- Troubleshooting
- License
Before installing, ensure you have the following installed on your local machine:
- PHP 8.1 or higher
- Composer
- Node.js & npm
- MySQL/MariaDB or any other supported database
-
Clone the Repository:
git clone https://github.com/harp-eng/ims.git cd your-repository -
Install PHP Dependencies:
Install the PHP dependencies using Composer:
composer install
-
Install JavaScript Dependencies:
Install the front-end dependencies using npm:
npm install
-
Generate Application Key:
Run the following command to generate the application key:
php artisan key:generate
-
Copy the .env.example file to .env:
cp .env.example .env
-
Set Environment Variables:
Update the .env file with your database credentials and other environment settings:
APP_NAME=LaravelApp APP_ENV=local APP_KEY=base64:YOUR_APP_KEY APP_DEBUG=true APP_URL=http://localhost DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
-
Configure File Permissions:
Ensure that the storage and bootstrap/cache directories are writable by your web server:
sudo chmod -R 775 storage sudo chmod -R 775 bootstrap/cache
-
Run Migrations:
Run the following command to migrate the database schema:
php artisan migrate
-
Run Seeders:
If your project includes seeders to populate the database with sample data, run:
php artisan db:seed
-
Build the Front-End Assets:
Compile the front-end assets (CSS, JS) using:
npm run dev
-
For production, use:
npm run build
-
Start the Local Development Server:
Use the Artisan command to start a local server:
php artisan serve
By default, the application will be available at http://localhost:8000.
-
Laravel provides a robust testing suite. To run the tests, use:
php artisan test
If you encounter any issues during installation or while running the application, check the following:
Ensure that the .env file is configured correctly. Verify that your PHP, Composer, and npm versions meet the requirements. Check the storage/logs/laravel.log file for errors.
This project is licensed under the MIT License. See the LICENSE file for more details.