mercredi 19 juillet 2017

Vue.js 2 with laravel Role Based Auth Admin Panel

I need suggestion how can i make a role based admin panel using vue.js 2 and laravel 5. I need routes in vue.js routes file and in laravel only one entry point for all router.

Ex :

Laravel route looks like :

/* Dashboard Index */
Route::group(['prefix' => 'dashboard', 'middleware' => ['auth', 'admin']], function () {
   Route::get('{path?}', 'HomeController@dashboard')->where('path', '[\/\w\.-]*');
});

Routes.js looks like :

export default [
    {
        path: '/dashboard',
        component: Dashboard,
        beforeEnter: requireAuth,
        children: [
            {
                path: '/',
                redirect: '/dashboard/home'
            },
            {
                path: 'home',
                component: require('dashboard/Home.vue')
            },
            {
                path: '*',
                redirect: '/dashboard'
            }
        ]
    }
]



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uHXvKE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire