mkinyua53/laravel-vue-boilerplate

This package is abandoned and no longer maintained. No replacement package was suggested.

A Laravel & Vue Quickstart.

v0.3.3 2020-06-06 11:19 UTC

This package is auto-updated.

Last update: 2021-07-06 13:55:21 UTC


README

Boilerplate for a PWA built with Laravel 5.5 and VueJs.

Includes a general /dashboard and an /admin dashboard

Install

Use Composer

composer create-project mkinyua53/laravel-vue-boilerplate myproject
cd myproject
npm run install

And then you can run watch to start on your vue project

npm run watch

Notable Packages

Backend

Frontend

Authorization

Please refer to the Authorization documentation for initial setup.

An InstallController is provided to quickly set-up your roles and permissions.

In the permissions() and roles() add your permissions and roles respectively to the array.

Go to the link /api/auth/install or call the installAuth() function from a route/controller to install the permissions and roles to the database. You can run as many times as you wish particullarly when you add new items in the arrays.

The resetAuth() function can be used to reset all roles and permissions to the default.

Vue Authorization

In Vue components, there a several methods to check authority. They return boolean value

Method Accepts Description
this.$auth.hasPermission(variable) string Checks if a user has a certain permission
this.$auth.hasPermissions(variable) array Checks if a user has all the given permissions
this.$auth.hasAnyPermissions(variable) array Checks if a user has any of the permissions
this.$auth.hasRole(variable) string Checks if a user has a certain role
this.$auth.hasRoles(variable) array Checks if a user has all the given roles
this.$auth.hasAnyRoles(variable) array Checks if a user has any of the role

Credit

Find me on twitter