Skip to content
🐘 A Laravel 6 SPA boilerplate with a users CRUD using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass, and Pug.
PHP Vue TypeScript HTML Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci fix: fix Xdebug configuration Feb 19, 2020
.vscode fix: fix Xdebug on Docker with VS Code on Linux Feb 19, 2020
app feat: use Laravel 6 Feb 18, 2020
bootstrap feat(users): add user registration support Dec 28, 2017
build fix(ci): prevent webpack-bundle-analyzer start Feb 19, 2020
config feat: use Laravel 6 Feb 18, 2020
database feat: use Laravel 6 Feb 18, 2020
docker fix: fix Xdebug configuration Feb 19, 2020
public feat: use Laravel 6 Feb 18, 2020
resources feat: use Laravel 6 Feb 18, 2020
routes fix: use correct status codes Jun 18, 2018
storage feat(users): add user registration support Dec 28, 2017
tests feat: use Laravel 6 Feb 18, 2020
.babelrc chore: initial commit Dec 27, 2017
.editorconfig chore: initial commit Dec 27, 2017
.env.appveyor ci: add Travis, CircleCI and AppVeyor support Dec 29, 2017
.env.docker feat(messages): add Laravel Echo support Apr 28, 2018
.env.example feat: use Laravel 6 Feb 18, 2020
.env.testing.example feat: add JWT authentication support Feb 15, 2018
.env.vsts-ci ci: add VSTS CI support on Windows, Linux and macOS Dec 31, 2017
.gitattributes chore: initial commit Dec 27, 2017
.gitignore feat: add Yarn to Dockerfile Feb 19, 2020
.gitlab-ci.yml fix: CI fixes Feb 19, 2020
.htaccess-novhosts fix(apache): improve .htaccess files Dec 27, 2017
.travis.yml fix(ci): prevent webpack-bundle-analyzer start Feb 19, 2020
.vsts-ci.yml fix(ci): prevent webpack-bundle-analyzer start Feb 19, 2020
CONTRIBUTING.md chore: initial commit Dec 27, 2017
DEPLOY.md feat: use Laravel 6 Feb 18, 2020
Dockerfile fix: fix Xdebug configuration Feb 19, 2020
Envoy.blade.php ci(GitLab): add continuous deploy Apr 2, 2018
LICENSE chore: add LICENSE file Dec 28, 2017
README.md feat: add Yarn to Dockerfile Feb 19, 2020
appveyor.yml fix(ci): appveyor fixes Feb 19, 2020
artisan chore: initial commit Dec 27, 2017
composer.json feat: use Laravel 6 Feb 18, 2020
composer.lock feat: use Laravel 6 Feb 18, 2020
docker-compose.yml fix: fix Xdebug configuration Feb 19, 2020
logo.png feat: use graphql-laravel instead of laravel-graphql Feb 9, 2019
package-lock.json
package.json fix(ci): prevent webpack-bundle-analyzer start Feb 19, 2020
phpunit-log-junit-fix.php ci: add support to view test results Dec 31, 2017
phpunit.xml ci: add VSTS CI support on Windows, Linux and macOS Dec 31, 2017
server.php chore: change live example url Apr 17, 2018
tsconfig.json feat: add vue-router lazy loading Feb 18, 2020
tslint.json refactor(vue): follow the vue-cli template Feb 11, 2018
webpack.mix.js fix(ci): prevent webpack-bundle-analyzer start Feb 19, 2020

README.md

Laravel Vue Boilerplate

Travis CI CircleCI AppVeyor

A Laravel 6 Single Page Application boilerplate using Vue.js 2.6, GraphQL, Bootstrap 4, TypeScript, Sass and Pug with:

  • A users CRUD if the current user is an admin written in RESTful and GraphQL.
  • i18n for English, Portuguese and Spanish, based on browser language settings.
  • Authentication using JWT.
  • WebSockets with Laravel Echo and Pusher.
  • Vue component tests using Jest and API tests using PHPUnit.
  • Already configured to run tests on Docker, GitLab CI (with continuous deploy), Travis CI, CircleCI, AppVeyor and VSTS CI on Windows, Linux and macOS.
  • Dockerfile configured with PHP 7.2, Node.js 12 and Composer, with MySQL and phpMyAdmin on Docker Compose.

You can check it live on this website, with the credentials:

Admin user

E-mail: admin@example.com
Password: admin

Normal user

E-mail: normal@example.com
Password: normal

Notice that all the changed data on that website sample, such as password and CRUD actions, won't be stored.

Main dependencies

Front-end:

The TypeScript code tries to follow the Airbnb JavaScript Style Guide, the linters are already included and configured.

Back-end:

Steps to run it:

Remember to search for "TODO change" on the files to change example code.

With Docker

Run:

docker-compose up --build

After it starts, just on the first time, run on another terminal:

docker exec laravel-vue-boilerplate bash -c "composer start && npm start"

The application will be available on http://localhost:8000 and the phpMyAdmin on http://localhost:8081

Common way

Rename the .env.example file to .env, and fill it with your local info, then:

Install PHP and JavaScript dependencies:

composer install
npm install

Generate Laravel keys:

php artisan key:generate

Generate JWT keys

php artisan jwt:secret

Generate i18n string for Vue, based on Laravel i18n files:

php artisan vue-i18n:generate

Migrate and seed the database:

php artisan migrate --seed

Compile all the front-end stuff:

npm run prod

Test:

composer test
npm test
You can’t perform that action at this time.