How to clone and setup Laravel project from GitHub
Comment (0)
Admin
Knowing how to clone and setup your Laravel project from GitHub is one of the most important thing you can know as a software developer. It gives you the ability to have access to millions of open source laravel projects out there.
In this content, I will be dropping a clear steps on how to clone laravel projects from github.
Step 1 : Locate the Repository
If you already have a Laravel project you want to clone before now, it is advisable you copy the repository link as directed on the snapshot above.
Step 2 : Open your Terminal
git clone git@github.com:nijwel/role-management.git
Step 3 : Setting Up Project
Laravel projects requires extra setups before it can run on your local computers.
First, we are going to install Node Module and Vendor files.
To install node module run npm install on your Terminal and wait for it to complete.
To install your Vendor file run composer install or compose update on your Terminal and wait for it to complete.
Step 4 : Setup .env file
To setup your .env, kindly duplicate your .env.example file and rename the duplicated file to .env.
cp .env.example .env
Step 5 : Setup Database
For this content, I'm using PHP MyAdmin Database.
On your .env file, locate this block of code below.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=role-management
DB_USERNAME=root
DB_PASSWORD=
The block of code above represents your Database connection and role-management is my database name, which you can create your database name to be something else.
Step 6 : Commands
npm run dev
php artisan key:generate
php artisan migrate
php artisan server
Step 7 : Conclusion
If you finished step 1 - 6 successfully, congratulation!!! you have just cloned your first Laravel Project from GitHub.
Comments (0)
Your Comment