bantenprov/vue-guard

Manage guard using vuejs

dev-master 2018-05-04 17:39 UTC

This package is not auto-updated.

Last update: 2023-09-22 03:10:32 UTC


README

Join the chat at https://gitter.im/vue-guard/Lobby Scrutinizer Code Quality Build Status Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads

Manage laravel permission using vuejs

Modul ini membutuhkan :

Install via composer :

$ composer require bantenprov/vue-guard:dev-master

edit config/app.php

'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
	//=======

	Bantenprov\VueGuard\VueGuardServiceProvider::class,

artisan command

$ php artisan vendor:publish --tag=vue-guard-assets
$ php artisan migrate

tambahkan pada resources/assets/js/routes/routes.js

...authGuard([
   {
      path: '/admin',
      name: 'admin',
      redirect: '/admin/dashboard',
      component: layout('Default'),
      children: [
	//............
	//=== vue guard route
          {
          path: '/admin/workflow/guard',
          components: {
            main: resolve => require(['~/components/bantenprov/vue-guard/vue_guard.index.vue'], resolve),
            navbar: resolve => require(['~/components/Navbar.vue'], resolve),
            sidebar: resolve => require(['~/components/Sidebar.vue'], resolve)
          },
          meta: {
            title: "Guard"
              }
          },
          {
          path: '/admin/workflow/guard/:id/show',
          components: {
            main: resolve => require(['~/components/bantenprov/vue-guard/vue_guard.show.vue'], resolve),
            navbar: resolve => require(['~/components/Navbar.vue'], resolve),
            sidebar: resolve => require(['~/components/Sidebar.vue'], resolve)
          },
          meta: {
            title: "Guard"
              }
          },
          {
          path: '/admin/workflow/guard/:id/edit',
          components: {
            main: resolve => require(['~/components/bantenprov/vue-guard/vue_guard.edit.vue'], resolve),
            navbar: resolve => require(['~/components/Navbar.vue'], resolve),
            sidebar: resolve => require(['~/components/Sidebar.vue'], resolve)
          },
          meta: {
            title: "Guard"
              }
          },
          {
          path: '/admin/workflow/guard/create',
          components: {
            main: resolve => require(['~/components/bantenprov/vue-guard/vue_guard.create.vue'], resolve),
            navbar: resolve => require(['~/components/Navbar.vue'], resolve),
            sidebar: resolve => require(['~/components/Sidebar.vue'], resolve)
          },
          meta: {
            title: "Guard"
              }
          },
        //=== end guard route

tambahkan pada resources/assets/js/app.js

new Vue({
  store,
  router,
  template: '<App/>',
  components: { App }
}).$mount('#app')

//---------------------

//== vue guard menus
import vue_guard_menu from './components/bantenprov/vue-guard/vue_guard_menu';

npm command :

( development )

$ npm run dev

( production )

$ npm run prod