[Tutorial] How to work with Laravel projects on github
-
Laragon bundles composer, nodejs, npm, git & git flow so there should be no problem if you want to work with projects on github.
In this tutorial, I'll show you how to work with Laravel 5 Boilerplate Project: https://github.com/rappasoft/laravel-5-boilerplate- Open Terminal (Menu > Laragon > Terminal or press CTRL + ALT + T)
- Clone the repo to Document Root and cd to it:
git clone https://github.com/rappasoft/laravel-5-boilerplate cd laravel-5-boilerplate
- Run composer & npm to install all dependencies:
composer install npm install
- Create database for the project: Menu > MySQL > Create database
for example: laravel-5-boilerplate - Create your .env from .env.example
cp .env.example .env
- Update your .env (change database connection properly)
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel-5-boilerplate DB_USERNAME=root DB_PASSWORD=
- Generate application key
php artisan key:generate
- Init data to database
php artisan migrate php artisan db:seed
- Build the styles and scripts
npm run <command>
The available commands are listed at the top of the package.json file under the 'scripts' key.
- Storage:link
After your project is installed you must run this command to link your public storage folder for user avatar uploads:
php artisan storage:link
- PHPUnit (for https://github.com/rappasoft/laravel-5-boilerplate)
After your project is installed, make sure you run the test suite to make sure all of the parts are working correctly. From the root of your project run:
phpunit
- Login (for https://github.com/rappasoft/laravel-5-boilerplate)
After your project is installed and you can access it in a browser, click the login button on the right of the navigation bar.
The administrator credentials are:
Username: admin@admin.com Password: secret
That's all forks!
Now, Reload Apache & you can browser the project at: http://laravel-5-boilerplate.test
Ref: http://laravel-boilerplate.com/5.7/start.html