
Prerequisites
Before setting up the Laravel project, ensure the following tools are installed on your system:
-
Git: Version control system. Download Git
-
PHP: Version 7.3 or higher. Check with
php -v
. -
Composer: PHP dependency manager. Download Composer
-
Web Server: Use Apache or Nginx for production. Laravel's built-in server is fine for local development.
-
Database: Ensure the required DB system (e.g., MySQL, PostgreSQL, SQLite) is installed.
Steps to Clone and Set Up the Project
-
Clone the Repository
git clone https://gitlab.com/SoengSouy/user-role-permission-laravel.git
Replace the URL if you're using a different repository.
-
Navigate to the Project Directory
cd user-role-permission-laravel
-
Install Dependencies via Composer
composer install
-
Set Up Environment Configuration
cp .env.example .env
Then, open the
.env
file and configure your database and other environment variables. -
Generate Application Key
php artisan key:generate
-
Configure Database in
.env
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_db DB_USERNAME=root DB_PASSWORD=your_password
-
Run Migrations
php artisan migrate
-
Start the Development Server
php artisan serve
Access the app at http://localhost:8000