Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

birdietorerik's avatar

Multiple dashboards

Hi!

Have created a laravel8.x / vue.js application

My system use roles and permissions

Try to implement another dashboard, but no luck New dashboard dosent show up (only blank page) ? Dosent get any errors ?

My new dashboard is called player

Here is what i have API-route

<?php

Route::group(['prefix' => 'v1', 'as' => 'api.', 'namespace' => 'Api\V1\Admin', 'middleware' => ['auth:sanctum']], function () {
    // Abilities

 // Locales
    Route::get('locales/languages', 'LocalesController@languages')->name('locales.languages');
    Route::get('locales/messages', 'LocalesController@messages')->name('locales.messages');

    // Dashboards
    Route::get('dashboard', 'DashboardApiController@index')->name('dashboard');
    // Dashboard - player
    Route::get('player', 'PlayerApiController@index')->name('player');

    // Permissions
    Route::resource('permissions', 'PermissionsApiController');
    
    // Roles
    Route::resource('roles', 'RolesApiController');

    // Users
    Route::resource('users', 'UsersApiController');

});

My dashboard that are working fine is;

  Route::get('dashboard', 'DashboardApiController@index')->name('dashboard');

Dashboard that are not working is:

 Route::get('player', 'PlayerApiController@index')->name('player');

My controller for dashboard

<?php

namespace App\Http\Controllers\Api\V1\Admin;

use App\Http\Controllers\Controller;
use App\Services\ChartsService;
use Illuminate\Support\Facades\Auth;

class DashboardApiController extends Controller
{
     /**
     * Create a new controller instance.
     *
     * @return void
     * Check if user is logged in
     */
    public function __construct()
    {
        $this->middleware(['auth', 'verified']);
    }
    
    public function index()
    {
        
        $onlineusers = new ChartsService([
            'title'        => 'Pålogget brukere',
            'icongraf'     => 'usersonline', 
            'chart_icon'   => 'wc', 
            'chart_type'   => 'latest',
            'model'        => 'App\Models\User',
            'column_class' => 'col-md-12',
            'fields'       => ['name', 'email'],
            'limit'        => 5,
            'filter_by_field'  => 'online',
            'filter_by_onlinestatus' => 1,
            'filter_by_period' => 'year',
            
        ]);
    
        return response()->json(compact('onlineusers'));
    }
}

My dashboard for player

<?php

namespace App\Http\Controllers\Api\V1\Admin;

use App\Http\Controllers\Controller;
use App\Services\ChartsService;
use Illuminate\Support\Facades\Auth;

class PlayerApiController extends Controller
{
     /**
     * Create a new controller instance.
     *
     * @return void
     * Check if user is logged in
     */
    public function __construct()
    {
        $this->middleware(['auth', 'verified']);
    }
    
    public function index()
    {
        
        $onlineusers = new ChartsService([
            'title'        => 'TESTING NEW DASHBOARD',
            'icongraf'     => 'usersonline', 
            'chart_icon'   => 'wc', 
            'chart_type'   => 'latest',
            'model'        => 'App\Models\User',
            'column_class' => 'col-md-12',
            'fields'       => ['name', 'email'],
            'limit'        => 5,
            'filter_by_field'  => 'online',
            'filter_by_onlinestatus' => 1,
            'filter_by_period' => 'year',
            
        ]);
    
        return response()->json(compact('onlineusers'));
    }
}

/Pages/Layout/Dashboardlayout.vue

<template>
  <div class="wrapper" :class="{ 'nav-open': $sidebar.showSidebar }">
    <event-hub></event-hub>
    <side-bar :sidebarLinks="sidebarLinks">
      <mobile-menu slot="content"></mobile-menu>
    </side-bar>

    <div class="main-panel">
      <top-navbar></top-navbar>
      <div class="content">
        <dashboard-content></dashboard-content>
      </div>
       
     
     
    </div>
       
  </div>
</template>

<script>
import DashboardContent from './Content.vue'
import ContentFooter from './ContentFooter.vue'
import TopNavbar from './TopNavbar.vue'
import MobileMenu from './MobileMenu.vue'


export default {
  components: {
    DashboardContent,
    TopNavbar,
    ContentFooter,
    MobileMenu
  },
  data() {
    return {
      sidebarLinks: [
        {
          title: 'global.dashboard',
          icon: 'dashboard',
          path: { name: 'dashboard' }
        },
        {
          title: 'cruds.userManagement.title',
          icon: 'person',
          path: { name: 'user_management' },
          gate: 'user_management_access',
          children: [
            {
              title: 'cruds.permission.title',
              icon: 'perm_data_setting',
              path: { name: 'permissions.index' },
              gate: 'permission_access'
            },
            {
              title: 'cruds.role.title',
              icon: 'group',
              path: { name: 'roles.index' },
              gate: 'role_access'
            },
            {
              title: 'cruds.user.title',
              icon: 'person',
              path: { name: 'users.index' },
              gate: 'user_access'
            }
          ]
        },
        {
          title: 'cruds.contentManagement.title',
          icon: 'table_view',
          path: { name: 'content_management' },
          gate: 'content_management_access',
          children: [
            {
              title: 'cruds.contentCategory.title',
              icon: 'table_view',
              path: { name: 'content_categories.index' },
              gate: 'content_category_access'
            },
            {
              title: 'cruds.contentTag.title',
              icon: 'table_view',
              path: { name: 'content_tags.index' },
              gate: 'content_tag_access'
            },
            {
              title: 'cruds.contentPage.title',
              icon: 'table_view',
              path: { name: 'content_pages.index' },
              gate: 'content_page_access'
            }
          ]
        },
        {
          title: 'cruds.amin.title',
          icon: 'admin_panel_settings',
          path: { name: 'amin' },
          gate: 'amin_access',
          children: [
            {
              title: 'cruds.country.title',
              icon: 'table_view',
              path: { name: 'countries.index' },
              gate: 'country_access'
            },
            {
              title: 'cruds.golfclub.title',
              icon: 'table_view',
              path: { name: 'golfclubs.index' },
              gate: 'golfclub_access'
            }
          ]
        },
        {
          title: 'cruds.forbund.title',
          icon: 'golf_course',
          path: { name: 'forbund' },
          gate: 'forbund_access',
          children: [
            {
              title: 'cruds.grad.title',
              icon: 'golf_course',
              path: { name: 'grads.index' },
              gate: 'grad_access'
            },
            {
              title: 'cruds.dommereb.title',
              icon: 'golf_course',
              path: { name: 'dommerebs.index' },
              gate: 'dommereb_access'
            }
          ]
        },
        
        {
          title: 'cruds.lokaleregler.title',
          icon: 'local_library',
          path: { name: 'lokalereglers.index' },
          gate: 'lokaleregler_access'
        },
        {
          title: 'cruds.walkieTalkie.title',
          icon: 'mic',
          path: { name: 'walkie_talkies.index' },
          gate: 'walkie_talkie_access'
        },
        {
          title: 'cruds.chat.title',
          icon: 'chat',
          path: { name: 'chats.index' },
          gate: 'chat_access'
        },
        {
          title: 'cruds.testing.title',
          icon: 'table_view',
          path: { name: 'testings.index' },
          gate: 'testing_access'
        },
        {
          title: 'cruds.Flightdata.title',
          icon: 'table_view',
          path: { name: 'Flightdata.index' },
          gate: 'Flightdata_access'
        },
        {
          title: 'cruds.gpstrackerclub.title',
          icon: 'gps_fixed',
          path: { name: 'gpstrackerclubs.index' },
          gate: 'gpstrackerclub_access'
        },

        {
          title: 'cruds.golfclubfeedback.title',
          icon: 'comment',
          path: { name: 'golfclubfeedbacks.index' },
          gate: 'golfclubfeedback_access'
        },
        {
          title: 'cruds.investor.title',
          icon: 'account_circle',
          path: { name: 'investors.index' },
          gate: 'investor_access'
        },
        {
          title: 'cruds.turnements.title',
          icon: 'sports_golf',
          path: { name: 'turnements.index' },
          gate: 'turnement_access',
          children: [
            {
              title: 'cruds.turnements.title',
              icon: 'comment',
              path: { name: 'turnements.index' },
              gate: 'turnement_access'
            },
            {
              title: 'cruds.startliste.title',
              icon: 'format_list_numbered',
              path: { name: 'startlistes.index' },
              gate: 'startliste_access'
            }
          ]
        },
        {
          title: 'cruds.configuration.title',
          icon: 'table_view',
          path: { name: 'configurations.index' },
          gate: 'configuration_access'
        }
      ],
    }
  }
}
</script>

/Pages/Layout/Playerlayout.vue:

<template>
  <div class="wrapper" :class="{ 'nav-open': $sidebar.showSidebar }">
    <event-hub></event-hub>
    <side-bar :sidebarLinks="sidebarLinks">
      <mobile-menu slot="content"></mobile-menu>
    </side-bar>

    <div class="main-panel">
      <top-navbar></top-navbar>
      <div class="content">
        <dashboard-content></dashboard-content>
      </div>
    </div>
  </div>
</template>

<script>
import DashboardContent from './Content.vue'
import TopNavbar from './TopNavbar.vue'
import MobileMenu from './MobileMenu.vue'


export default {
  components: {
    DashboardContent,
    TopNavbar,
    MobileMenu
  },
  data() {
    return {
      sidebarLinks: [
        {
          title: 'global.dashboard',
          icon: 'dashboard',
          path: { name: 'player' }
        },
        {
          title: 'cruds.userManagement.title',
          icon: 'person',
          path: { name: 'user_management' },
          gate: 'user_management_access',
          children: [
            {
              title: 'cruds.permission.title',
              icon: 'perm_data_setting',
              path: { name: 'permissions.index' },
              gate: 'permission_access'
            },
            {
              title: 'cruds.role.title',
              icon: 'group',
              path: { name: 'roles.index' },
              gate: 'role_access'
            },
            {
              title: 'cruds.user.title',
              icon: 'person',
              path: { name: 'users.index' },
              gate: 'user_access'
            }
          ]
        },
        {
          title: 'cruds.contentManagement.title',
          icon: 'table_view',
          path: { name: 'content_management' },
          gate: 'content_management_access',
          children: [
            {
              title: 'cruds.contentCategory.title',
              icon: 'table_view',
              path: { name: 'content_categories.index' },
              gate: 'content_category_access'
            },
            {
              title: 'cruds.contentTag.title',
              icon: 'table_view',
              path: { name: 'content_tags.index' },
              gate: 'content_tag_access'
            },
            {
              title: 'cruds.contentPage.title',
              icon: 'table_view',
              path: { name: 'content_pages.index' },
              gate: 'content_page_access'
            }
          ]
        },
        {
          title: 'cruds.amin.title',
          icon: 'admin_panel_settings',
          path: { name: 'amin' },
          gate: 'amin_access',
          children: [
            {
              title: 'cruds.country.title',
              icon: 'table_view',
              path: { name: 'countries.index' },
              gate: 'country_access'
            },
            {
              title: 'cruds.golfclub.title',
              icon: 'table_view',
              path: { name: 'golfclubs.index' },
              gate: 'golfclub_access'
            }
          ]
        },
        {
          title: 'cruds.forbund.title',
          icon: 'golf_course',
          path: { name: 'forbund' },
          gate: 'forbund_access',
          children: [
            {
              title: 'cruds.grad.title',
              icon: 'golf_course',
              path: { name: 'grads.index' },
              gate: 'grad_access'
            },
            {
              title: 'cruds.dommereb.title',
              icon: 'golf_course',
              path: { name: 'dommerebs.index' },
              gate: 'dommereb_access'
            }
          ]
        },
        
        {
          title: 'cruds.lokaleregler.title',
          icon: 'local_library',
          path: { name: 'lokalereglers.index' },
          gate: 'lokaleregler_access'
        },
        {
          title: 'cruds.walkieTalkie.title',
          icon: 'mic',
          path: { name: 'walkie_talkies.index' },
          gate: 'walkie_talkie_access'
        },
        {
          title: 'cruds.chat.title',
          icon: 'chat',
          path: { name: 'chats.index' },
          gate: 'chat_access'
        },
        {
          title: 'cruds.testing.title',
          icon: 'table_view',
          path: { name: 'testings.index' },
          gate: 'testing_access'
        },
        {
          title: 'cruds.Flightdata.title',
          icon: 'table_view',
          path: { name: 'Flightdata.index' },
          gate: 'Flightdata_access'
        },
        {
          title: 'cruds.gpstrackerclub.title',
          icon: 'gps_fixed',
          path: { name: 'gpstrackerclubs.index' },
          gate: 'gpstrackerclub_access'
        },

        {
          title: 'cruds.golfclubfeedback.title',
          icon: 'comment',
          path: { name: 'golfclubfeedbacks.index' },
          gate: 'golfclubfeedback_access'
        },

        {
          title: 'cruds.turnement.title',
          icon: 'table_view',
          path: { name: 'turnement' },
          gate: 'turnement_access',
          children: [
            {
              title: 'cruds.turnement.title',
              icon: 'comment',
              path: { name: 'turnement.index' },
              gate: 'turnement_access'
            },
            {
              title: 'cruds.startliste.title',
              icon: 'format_list_numbered',
              path: { name: 'startlistes.index' },
              gate: 'startliste_access'
            }
          ]
        },
      ]
    }
  }
}
</script>

Is there somthing missing ?

0 likes
4 replies
Nakov's avatar

Search in your project where is this Dashboardlayout registered to Vue, and do the same with your Playerlayout component. If you use Vue router or bootstrap.js or app.js or whatever. Seems like the component is not registered at all. Because your index method just returns a JSON response.

birdietorerik's avatar

@Nakov Hi!

Found this route file -> routes.js

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const View = { template: '<router-view></router-view>' }

const routes = [
  {
    path: '/',
    component: () => import('@pages/Layout/DashboardLayout.vue'),
    redirect: 'dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        component: () => import('@pages/Dashboard.vue'),
        meta: { title: 'global.dashboard' }
      },
      {
        path: 'player',
        name: 'player',
        component: () => import('@pages/Player.vue'),
        meta: { title: 'global.player' }
      },
      {
        path: 'user-management',
        name: 'user_management',
        component: View,
        redirect: { name: 'permissions.index' },
        children: [
          {
            path: 'permissions',
            name: 'permissions.index',
            component: () => import('@cruds/Permissions/Index.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/create',
            name: 'permissions.create',
            component: () => import('@cruds/Permissions/Create.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/:id',
            name: 'permissions.show',
            component: () => import('@cruds/Permissions/Show.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/:id/edit',
            name: 'permissions.edit',
            component: () => import('@cruds/Permissions/Edit.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'roles',
            name: 'roles.index',
            component: () => import('@cruds/Roles/Index.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/create',
            name: 'roles.create',
            component: () => import('@cruds/Roles/Create.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/:id',
            name: 'roles.show',
            component: () => import('@cruds/Roles/Show.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/:id/edit',
            name: 'roles.edit',
            component: () => import('@cruds/Roles/Edit.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'users',
            name: 'users.index',
            component: () => import('@cruds/Users/Index.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/create',
            name: 'users.create',
            component: () => import('@cruds/Users/Create.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/:id',
            name: 'users.show',
            component: () => import('@cruds/Users/Show.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/:id/edit',
            name: 'users.edit',
            component: () => import('@cruds/Users/Edit.vue'),
            meta: { title: 'cruds.user.title' }
          }
        ]
      },
      {
        path: 'content-management',
        name: 'content_management',
        component: View,
        redirect: { name: 'content_categories.index' },
        children: [
          {
            path: 'content-categories',
            name: 'content_categories.index',
            component: () => import('@cruds/ContentCategories/Index.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/create',
            name: 'content_categories.create',
            component: () => import('@cruds/ContentCategories/Create.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/:id',
            name: 'content_categories.show',
            component: () => import('@cruds/ContentCategories/Show.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/:id/edit',
            name: 'content_categories.edit',
            component: () => import('@cruds/ContentCategories/Edit.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-tags',
            name: 'content_tags.index',
            component: () => import('@cruds/ContentTags/Index.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/create',
            name: 'content_tags.create',
            component: () => import('@cruds/ContentTags/Create.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/:id',
            name: 'content_tags.show',
            component: () => import('@cruds/ContentTags/Show.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/:id/edit',
            name: 'content_tags.edit',
            component: () => import('@cruds/ContentTags/Edit.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-pages',
            name: 'content_pages.index',
            component: () => import('@cruds/ContentPages/Index.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/create',
            name: 'content_pages.create',
            component: () => import('@cruds/ContentPages/Create.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/:id',
            name: 'content_pages.show',
            component: () => import('@cruds/ContentPages/Show.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/:id/edit',
            name: 'content_pages.edit',
            component: () => import('@cruds/ContentPages/Edit.vue'),
            meta: { title: 'cruds.contentPage.title' }
          }
        ]
      },
      {
        path: 'amin',
        name: 'amin',
        component: View,
        redirect: { name: 'countries.index' },
        children: [
          {
            path: 'countries',
            name: 'countries.index',
            component: () => import('@cruds/Countries/Index.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/create',
            name: 'countries.create',
            component: () => import('@cruds/Countries/Create.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/:id',
            name: 'countries.show',
            component: () => import('@cruds/Countries/Show.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/:id/edit',
            name: 'countries.edit',
            component: () => import('@cruds/Countries/Edit.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'golfclubs',
            name: 'golfclubs.index',
            component: () => import('@cruds/Golfclubs/Index.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/create',
            name: 'golfclubs.create',
            component: () => import('@cruds/Golfclubs/Create.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/:id',
            name: 'golfclubs.show',
            component: () => import('@cruds/Golfclubs/Show.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/:id/edit',
            name: 'golfclubs.edit',
            component: () => import('@cruds/Golfclubs/Edit.vue'),
            meta: { title: 'cruds.golfclub.title' }
          }
        ]
      },

// turnemen

      {
        path: 'forbund',
        name: 'forbund',
        component: View,
        redirect: { name: 'grads.index' },
        children: [
          {
            path: 'grads',
            name: 'grads.index',
            component: () => import('@cruds/Grads/Index.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/create',
            name: 'grads.create',
            component: () => import('@cruds/Grads/Create.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/:id',
            name: 'grads.show',
            component: () => import('@cruds/Grads/Show.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/:id/edit',
            name: 'grads.edit',
            component: () => import('@cruds/Grads/Edit.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'dommerebs',
            name: 'dommerebs.index',
            component: () => import('@cruds/Dommerebs/Index.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/create',
            name: 'dommerebs.create',
            component: () => import('@cruds/Dommerebs/Create.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/:id',
            name: 'dommerebs.show',
            component: () => import('@cruds/Dommerebs/Show.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/:id/edit',
            name: 'dommerebs.edit',
            component: () => import('@cruds/Dommerebs/Edit.vue'),
            meta: { title: 'cruds.dommereb.title' }
          }
        ]
      },
      {
        path: 'startlistes',
        name: 'startlistes.index',
        component: () => import('@cruds/Startlistes/Index.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/create',
        name: 'startlistes.create',
        component: () => import('@cruds/Startlistes/Create.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/:id',
        name: 'startlistes.show',
        component: () => import('@cruds/Startlistes/Show.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/:id/edit',
        name: 'startlistes.edit',
        component: () => import('@cruds/Startlistes/Edit.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'lokalereglers',
        name: 'lokalereglers.index',
        component: () => import('@cruds/Lokalereglers/Index.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/create',
        name: 'lokalereglers.create',
        component: () => import('@cruds/Lokalereglers/Create.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/:id',
        name: 'lokalereglers.show',
        component: () => import('@cruds/Lokalereglers/Show.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/:id/edit',
        name: 'lokalereglers.edit',
        component: () => import('@cruds/Lokalereglers/Edit.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'walkie-talkies',
        name: 'walkie_talkies.index',
        component: () => import('@cruds/WalkieTalkies/Index.vue'),
        meta: { title: 'cruds.walkieTalkie.title' }
      },
      {
        path: 'chats',
        name: 'chats.index',
        component: () => import('@cruds/Chats/Index.vue'),
        meta: { title: 'cruds.chat.title' }
      },
      {
        path: 'settings',
        name: 'settings.index',
        component: () => import('@cruds/Settings/Index.vue'),
        meta: { title: 'cruds.setting.title' }
      },
      {
        path: 'testings',
        name: 'testings.index',
        component: () => import('@cruds/Testings/Index.vue'),
        meta: { title: 'cruds.testing.title' }
      },
      {
        path: 'turnements',
        name: 'turnements.index',
        component: () => import('@cruds/Turnements/Index.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/create',
        name: 'turnements.create',
        component: () => import('@cruds/Turnements/Create.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/:id',
        name: 'turnements.show',
        component: () => import('@cruds/Turnements/Show.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/:id/edit',
        name: 'turnements.edit',
        component: () => import('@cruds/Turnements/Edit.vue'),
        meta: { title: 'cruds.turnement.title' }
      },

      {
        path: 'gpstrackerclubs',
        name: 'gpstrackerclubs.index',
        component: () => import('@cruds/Gpstrackerclubs/Index.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/create',
        name: 'gpstrackerclubs.create',
        component: () => import('@cruds/Gpstrackerclubs/Create.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/:id',
        name: 'gpstrackerclubs.show',
        component: () => import('@cruds/Gpstrackerclubs/Show.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/:id/edit',
        name: 'gpstrackerclubs.edit',
        component: () => import('@cruds/Gpstrackerclubs/Edit.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },

      {
        path: 'golfclubfeedbacks',
        name: 'golfclubfeedbacks.index',
        component: () => import('@cruds/Golfclubfeedbacks/Index.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/create',
        name: 'golfclubfeedbacks.create',
        component: () => import('@cruds/Golfclubfeedbacks/Create.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/:id',
        name: 'golfclubfeedbacks.show',
        component: () => import('@cruds/Golfclubfeedbacks/Show.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/:id/edit',
        name: 'golfclubfeedbacks.edit',
        component: () => import('@cruds/Golfclubfeedbacks/Edit.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },

      {
        path: 'investors',
        name: 'investors.index',
        component: () => import('@cruds/Investors/Index.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/create',
        name: 'investors.create',
        component: () => import('@cruds/Investors/Create.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/:id',
        name: 'investors.show',
        component: () => import('@cruds/Investors/Show.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/:id/edit',
        name: 'investors.edit',
        component: () => import('@cruds/Investors/Edit.vue'),
        meta: { title: 'cruds.investor.title' }
      },

      {
        path: 'configurations',
        name: 'configurations.index',
        component: () => import('@cruds/Configurations/Index.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/create',
        name: 'configurations.create',
        component: () => import('@cruds/Configurations/Create.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/:id',
        name: 'configurations.show',
        component: () => import('@cruds/Configurations/Show.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/:id/edit',
        name: 'configurations.edit',
        component: () => import('@cruds/Configurations/Edit.vue'),
        meta: { title: 'cruds.configuration.title' }
      }

    ]



  


  }
]

export default new VueRouter({
  mode: 'history',
  base: '/admin',
  routes
})

Added this to routes.js

{
        path: 'player',
        name: 'player',
        component: () => import('@pages/Player.vue'),
        meta: { title: 'global.player' }
      },

Now, i get dashboard up and running for role->player

But how to set Players layoutref like dashboard:

    path: '/',
    component: () => import('@pages/Layout/DashboardLayout.vue'),
    redirect: 'dashboard',

Use new file like routes.js for player ?

birdietorerik's avatar

@Nakov Hi!

Sorry, not same as i use. But my app.js use routes -> routes.js Try to add routes2.js, but this dosen work. Gives me a blank page with no errors ?

/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap')

window.Vue = require('vue')
window.moment.updateLocale('en', { week: { dow: 1 } })

Vue.config.productionTip = false
Vue.prototype.$jquery = $

import App from './App.vue'
import VueGeolocation from 'vue-browser-geolocation'
import * as VueGoogleMaps from 'vue2-google-maps'


// Core
import router from './routes/routes'
import router2 from './routes/routes2'
import store from './store/store'
import i18n from './i18n'


// Plugins

import GlobalComponents from './globalComponents'
import GlobalDirectives from './globalDirectives'
import GlobalMixins from './mixins/global'
import { mapGetters, mapActions } from 'vuex'



Vue.use(GlobalComponents)
Vue.use(GlobalDirectives)
Vue.use(GlobalMixins)
Vue.use(VueGeolocation)
Vue.config.productionTip = false

Vue.use(VueGoogleMaps,
  {
    load: {
       key: 'AIzaSyASILpMOG-mu2AIxxxxxwsadase21214',
       libraries: "places" // necessary for places input 
       
    }
    
    
})

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

const app = new Vue({
  el: '#app',
  render: h => h(App),
  router,
  router2,
  store,
  i18n,
  created() {
    this.fetchLanguages()
  },
  methods: {
    ...mapActions('I18NStore', ['fetchLanguages'])
  }
})

routes.js

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const View = { template: '<router-view></router-view>' }

const routes = [
  {
    path: '/',
    component: () => import('@pages/Layout/DashboardLayout.vue'),
    redirect: 'dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        component: () => import('@pages/Dashboard.vue'),
        meta: { title: 'global.dashboard' }
      },
      {
        path: 'user-management',
        name: 'user_management',
        component: View,
        redirect: { name: 'permissions.index' },
        children: [
          {
            path: 'permissions',
            name: 'permissions.index',
            component: () => import('@cruds/Permissions/Index.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/create',
            name: 'permissions.create',
            component: () => import('@cruds/Permissions/Create.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/:id',
            name: 'permissions.show',
            component: () => import('@cruds/Permissions/Show.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/:id/edit',
            name: 'permissions.edit',
            component: () => import('@cruds/Permissions/Edit.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'roles',
            name: 'roles.index',
            component: () => import('@cruds/Roles/Index.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/create',
            name: 'roles.create',
            component: () => import('@cruds/Roles/Create.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/:id',
            name: 'roles.show',
            component: () => import('@cruds/Roles/Show.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/:id/edit',
            name: 'roles.edit',
            component: () => import('@cruds/Roles/Edit.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'users',
            name: 'users.index',
            component: () => import('@cruds/Users/Index.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/create',
            name: 'users.create',
            component: () => import('@cruds/Users/Create.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/:id',
            name: 'users.show',
            component: () => import('@cruds/Users/Show.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/:id/edit',
            name: 'users.edit',
            component: () => import('@cruds/Users/Edit.vue'),
            meta: { title: 'cruds.user.title' }
          }
        ]
      },
      {
        path: 'content-management',
        name: 'content_management',
        component: View,
        redirect: { name: 'content_categories.index' },
        children: [
          {
            path: 'content-categories',
            name: 'content_categories.index',
            component: () => import('@cruds/ContentCategories/Index.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/create',
            name: 'content_categories.create',
            component: () => import('@cruds/ContentCategories/Create.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/:id',
            name: 'content_categories.show',
            component: () => import('@cruds/ContentCategories/Show.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/:id/edit',
            name: 'content_categories.edit',
            component: () => import('@cruds/ContentCategories/Edit.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-tags',
            name: 'content_tags.index',
            component: () => import('@cruds/ContentTags/Index.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/create',
            name: 'content_tags.create',
            component: () => import('@cruds/ContentTags/Create.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/:id',
            name: 'content_tags.show',
            component: () => import('@cruds/ContentTags/Show.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/:id/edit',
            name: 'content_tags.edit',
            component: () => import('@cruds/ContentTags/Edit.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-pages',
            name: 'content_pages.index',
            component: () => import('@cruds/ContentPages/Index.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/create',
            name: 'content_pages.create',
            component: () => import('@cruds/ContentPages/Create.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/:id',
            name: 'content_pages.show',
            component: () => import('@cruds/ContentPages/Show.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/:id/edit',
            name: 'content_pages.edit',
            component: () => import('@cruds/ContentPages/Edit.vue'),
            meta: { title: 'cruds.contentPage.title' }
          }
        ]
      },
      {
        path: 'amin',
        name: 'amin',
        component: View,
        redirect: { name: 'countries.index' },
        children: [
          {
            path: 'countries',
            name: 'countries.index',
            component: () => import('@cruds/Countries/Index.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/create',
            name: 'countries.create',
            component: () => import('@cruds/Countries/Create.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/:id',
            name: 'countries.show',
            component: () => import('@cruds/Countries/Show.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/:id/edit',
            name: 'countries.edit',
            component: () => import('@cruds/Countries/Edit.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'golfclubs',
            name: 'golfclubs.index',
            component: () => import('@cruds/Golfclubs/Index.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/create',
            name: 'golfclubs.create',
            component: () => import('@cruds/Golfclubs/Create.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/:id',
            name: 'golfclubs.show',
            component: () => import('@cruds/Golfclubs/Show.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/:id/edit',
            name: 'golfclubs.edit',
            component: () => import('@cruds/Golfclubs/Edit.vue'),
            meta: { title: 'cruds.golfclub.title' }
          }
        ]
      },

// turnemen

      {
        path: 'forbund',
        name: 'forbund',
        component: View,
        redirect: { name: 'grads.index' },
        children: [
          {
            path: 'grads',
            name: 'grads.index',
            component: () => import('@cruds/Grads/Index.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/create',
            name: 'grads.create',
            component: () => import('@cruds/Grads/Create.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/:id',
            name: 'grads.show',
            component: () => import('@cruds/Grads/Show.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/:id/edit',
            name: 'grads.edit',
            component: () => import('@cruds/Grads/Edit.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'dommerebs',
            name: 'dommerebs.index',
            component: () => import('@cruds/Dommerebs/Index.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/create',
            name: 'dommerebs.create',
            component: () => import('@cruds/Dommerebs/Create.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/:id',
            name: 'dommerebs.show',
            component: () => import('@cruds/Dommerebs/Show.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/:id/edit',
            name: 'dommerebs.edit',
            component: () => import('@cruds/Dommerebs/Edit.vue'),
            meta: { title: 'cruds.dommereb.title' }
          }
        ]
      },
      {
        path: 'startlistes',
        name: 'startlistes.index',
        component: () => import('@cruds/Startlistes/Index.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/create',
        name: 'startlistes.create',
        component: () => import('@cruds/Startlistes/Create.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/:id',
        name: 'startlistes.show',
        component: () => import('@cruds/Startlistes/Show.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/:id/edit',
        name: 'startlistes.edit',
        component: () => import('@cruds/Startlistes/Edit.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'lokalereglers',
        name: 'lokalereglers.index',
        component: () => import('@cruds/Lokalereglers/Index.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/create',
        name: 'lokalereglers.create',
        component: () => import('@cruds/Lokalereglers/Create.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/:id',
        name: 'lokalereglers.show',
        component: () => import('@cruds/Lokalereglers/Show.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/:id/edit',
        name: 'lokalereglers.edit',
        component: () => import('@cruds/Lokalereglers/Edit.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'walkie-talkies',
        name: 'walkie_talkies.index',
        component: () => import('@cruds/WalkieTalkies/Index.vue'),
        meta: { title: 'cruds.walkieTalkie.title' }
      },
      {
        path: 'chats',
        name: 'chats.index',
        component: () => import('@cruds/Chats/Index.vue'),
        meta: { title: 'cruds.chat.title' }
      },
      {
        path: 'settings',
        name: 'settings.index',
        component: () => import('@cruds/Settings/Index.vue'),
        meta: { title: 'cruds.setting.title' }
      },
      {
        path: 'testings',
        name: 'testings.index',
        component: () => import('@cruds/Testings/Index.vue'),
        meta: { title: 'cruds.testing.title' }
      },
      {
        path: 'turnements',
        name: 'turnements.index',
        component: () => import('@cruds/Turnements/Index.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/create',
        name: 'turnements.create',
        component: () => import('@cruds/Turnements/Create.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/:id',
        name: 'turnements.show',
        component: () => import('@cruds/Turnements/Show.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/:id/edit',
        name: 'turnements.edit',
        component: () => import('@cruds/Turnements/Edit.vue'),
        meta: { title: 'cruds.turnement.title' }
      },

      {
        path: 'gpstrackerclubs',
        name: 'gpstrackerclubs.index',
        component: () => import('@cruds/Gpstrackerclubs/Index.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/create',
        name: 'gpstrackerclubs.create',
        component: () => import('@cruds/Gpstrackerclubs/Create.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/:id',
        name: 'gpstrackerclubs.show',
        component: () => import('@cruds/Gpstrackerclubs/Show.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/:id/edit',
        name: 'gpstrackerclubs.edit',
        component: () => import('@cruds/Gpstrackerclubs/Edit.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },

      {
        path: 'golfclubfeedbacks',
        name: 'golfclubfeedbacks.index',
        component: () => import('@cruds/Golfclubfeedbacks/Index.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/create',
        name: 'golfclubfeedbacks.create',
        component: () => import('@cruds/Golfclubfeedbacks/Create.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/:id',
        name: 'golfclubfeedbacks.show',
        component: () => import('@cruds/Golfclubfeedbacks/Show.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/:id/edit',
        name: 'golfclubfeedbacks.edit',
        component: () => import('@cruds/Golfclubfeedbacks/Edit.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },

      {
        path: 'investors',
        name: 'investors.index',
        component: () => import('@cruds/Investors/Index.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/create',
        name: 'investors.create',
        component: () => import('@cruds/Investors/Create.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/:id',
        name: 'investors.show',
        component: () => import('@cruds/Investors/Show.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/:id/edit',
        name: 'investors.edit',
        component: () => import('@cruds/Investors/Edit.vue'),
        meta: { title: 'cruds.investor.title' }
      },

      {
        path: 'configurations',
        name: 'configurations.index',
        component: () => import('@cruds/Configurations/Index.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/create',
        name: 'configurations.create',
        component: () => import('@cruds/Configurations/Create.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/:id',
        name: 'configurations.show',
        component: () => import('@cruds/Configurations/Show.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/:id/edit',
        name: 'configurations.edit',
        component: () => import('@cruds/Configurations/Edit.vue'),
        meta: { title: 'cruds.configuration.title' }
      }

    ]



  


  }
]

export default new VueRouter({
  mode: 'history',
  base: '/admin',
  routes
})

routes2.js

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const View = { template: '<router-view></router-view>' }

const routes = [
  {
    path: '/',
    component: () => import('@pages/Layout/PlayerLayout.vue'),
    redirect: 'player',
    children: [
      {
        path: 'player',
        name: 'player',
        component: () => import('@pages/Player.vue'),
        meta: { title: 'global.player' }
      },
      {
        path: 'user-management',
        name: 'user_management',
        component: View,
        redirect: { name: 'permissions.index' },
        children: [
          {
            path: 'permissions',
            name: 'permissions.index',
            component: () => import('@cruds/Permissions/Index.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/create',
            name: 'permissions.create',
            component: () => import('@cruds/Permissions/Create.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/:id',
            name: 'permissions.show',
            component: () => import('@cruds/Permissions/Show.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'permissions/:id/edit',
            name: 'permissions.edit',
            component: () => import('@cruds/Permissions/Edit.vue'),
            meta: { title: 'cruds.permission.title' }
          },
          {
            path: 'roles',
            name: 'roles.index',
            component: () => import('@cruds/Roles/Index.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/create',
            name: 'roles.create',
            component: () => import('@cruds/Roles/Create.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/:id',
            name: 'roles.show',
            component: () => import('@cruds/Roles/Show.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'roles/:id/edit',
            name: 'roles.edit',
            component: () => import('@cruds/Roles/Edit.vue'),
            meta: { title: 'cruds.role.title' }
          },
          {
            path: 'users',
            name: 'users.index',
            component: () => import('@cruds/Users/Index.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/create',
            name: 'users.create',
            component: () => import('@cruds/Users/Create.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/:id',
            name: 'users.show',
            component: () => import('@cruds/Users/Show.vue'),
            meta: { title: 'cruds.user.title' }
          },
          {
            path: 'users/:id/edit',
            name: 'users.edit',
            component: () => import('@cruds/Users/Edit.vue'),
            meta: { title: 'cruds.user.title' }
          }
        ]
      },
      {
        path: 'content-management',
        name: 'content_management',
        component: View,
        redirect: { name: 'content_categories.index' },
        children: [
          {
            path: 'content-categories',
            name: 'content_categories.index',
            component: () => import('@cruds/ContentCategories/Index.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/create',
            name: 'content_categories.create',
            component: () => import('@cruds/ContentCategories/Create.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/:id',
            name: 'content_categories.show',
            component: () => import('@cruds/ContentCategories/Show.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-categories/:id/edit',
            name: 'content_categories.edit',
            component: () => import('@cruds/ContentCategories/Edit.vue'),
            meta: { title: 'cruds.contentCategory.title' }
          },
          {
            path: 'content-tags',
            name: 'content_tags.index',
            component: () => import('@cruds/ContentTags/Index.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/create',
            name: 'content_tags.create',
            component: () => import('@cruds/ContentTags/Create.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/:id',
            name: 'content_tags.show',
            component: () => import('@cruds/ContentTags/Show.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-tags/:id/edit',
            name: 'content_tags.edit',
            component: () => import('@cruds/ContentTags/Edit.vue'),
            meta: { title: 'cruds.contentTag.title' }
          },
          {
            path: 'content-pages',
            name: 'content_pages.index',
            component: () => import('@cruds/ContentPages/Index.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/create',
            name: 'content_pages.create',
            component: () => import('@cruds/ContentPages/Create.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/:id',
            name: 'content_pages.show',
            component: () => import('@cruds/ContentPages/Show.vue'),
            meta: { title: 'cruds.contentPage.title' }
          },
          {
            path: 'content-pages/:id/edit',
            name: 'content_pages.edit',
            component: () => import('@cruds/ContentPages/Edit.vue'),
            meta: { title: 'cruds.contentPage.title' }
          }
        ]
      },
      {
        path: 'amin',
        name: 'amin',
        component: View,
        redirect: { name: 'countries.index' },
        children: [
          {
            path: 'countries',
            name: 'countries.index',
            component: () => import('@cruds/Countries/Index.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/create',
            name: 'countries.create',
            component: () => import('@cruds/Countries/Create.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/:id',
            name: 'countries.show',
            component: () => import('@cruds/Countries/Show.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'countries/:id/edit',
            name: 'countries.edit',
            component: () => import('@cruds/Countries/Edit.vue'),
            meta: { title: 'cruds.country.title' }
          },
          {
            path: 'golfclubs',
            name: 'golfclubs.index',
            component: () => import('@cruds/Golfclubs/Index.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/create',
            name: 'golfclubs.create',
            component: () => import('@cruds/Golfclubs/Create.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/:id',
            name: 'golfclubs.show',
            component: () => import('@cruds/Golfclubs/Show.vue'),
            meta: { title: 'cruds.golfclub.title' }
          },
          {
            path: 'golfclubs/:id/edit',
            name: 'golfclubs.edit',
            component: () => import('@cruds/Golfclubs/Edit.vue'),
            meta: { title: 'cruds.golfclub.title' }
          }
        ]
      },

// turnemen

      {
        path: 'forbund',
        name: 'forbund',
        component: View,
        redirect: { name: 'grads.index' },
        children: [
          {
            path: 'grads',
            name: 'grads.index',
            component: () => import('@cruds/Grads/Index.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/create',
            name: 'grads.create',
            component: () => import('@cruds/Grads/Create.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/:id',
            name: 'grads.show',
            component: () => import('@cruds/Grads/Show.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'grads/:id/edit',
            name: 'grads.edit',
            component: () => import('@cruds/Grads/Edit.vue'),
            meta: { title: 'cruds.grad.title' }
          },
          {
            path: 'dommerebs',
            name: 'dommerebs.index',
            component: () => import('@cruds/Dommerebs/Index.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/create',
            name: 'dommerebs.create',
            component: () => import('@cruds/Dommerebs/Create.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/:id',
            name: 'dommerebs.show',
            component: () => import('@cruds/Dommerebs/Show.vue'),
            meta: { title: 'cruds.dommereb.title' }
          },
          {
            path: 'dommerebs/:id/edit',
            name: 'dommerebs.edit',
            component: () => import('@cruds/Dommerebs/Edit.vue'),
            meta: { title: 'cruds.dommereb.title' }
          }
        ]
      },
      {
        path: 'startlistes',
        name: 'startlistes.index',
        component: () => import('@cruds/Startlistes/Index.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/create',
        name: 'startlistes.create',
        component: () => import('@cruds/Startlistes/Create.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/:id',
        name: 'startlistes.show',
        component: () => import('@cruds/Startlistes/Show.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'startlistes/:id/edit',
        name: 'startlistes.edit',
        component: () => import('@cruds/Startlistes/Edit.vue'),
        meta: { title: 'cruds.startliste.title' }
      },
      {
        path: 'lokalereglers',
        name: 'lokalereglers.index',
        component: () => import('@cruds/Lokalereglers/Index.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/create',
        name: 'lokalereglers.create',
        component: () => import('@cruds/Lokalereglers/Create.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/:id',
        name: 'lokalereglers.show',
        component: () => import('@cruds/Lokalereglers/Show.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'lokalereglers/:id/edit',
        name: 'lokalereglers.edit',
        component: () => import('@cruds/Lokalereglers/Edit.vue'),
        meta: { title: 'cruds.lokaleregler.title' }
      },
      {
        path: 'walkie-talkies',
        name: 'walkie_talkies.index',
        component: () => import('@cruds/WalkieTalkies/Index.vue'),
        meta: { title: 'cruds.walkieTalkie.title' }
      },
      {
        path: 'chats',
        name: 'chats.index',
        component: () => import('@cruds/Chats/Index.vue'),
        meta: { title: 'cruds.chat.title' }
      },
      {
        path: 'settings',
        name: 'settings.index',
        component: () => import('@cruds/Settings/Index.vue'),
        meta: { title: 'cruds.setting.title' }
      },
      {
        path: 'testings',
        name: 'testings.index',
        component: () => import('@cruds/Testings/Index.vue'),
        meta: { title: 'cruds.testing.title' }
      },
      {
        path: 'turnements',
        name: 'turnements.index',
        component: () => import('@cruds/Turnements/Index.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/create',
        name: 'turnements.create',
        component: () => import('@cruds/Turnements/Create.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/:id',
        name: 'turnements.show',
        component: () => import('@cruds/Turnements/Show.vue'),
        meta: { title: 'cruds.turnement.title' }
      },
      {
        path: 'turnements/:id/edit',
        name: 'turnements.edit',
        component: () => import('@cruds/Turnements/Edit.vue'),
        meta: { title: 'cruds.turnement.title' }
      },

      {
        path: 'gpstrackerclubs',
        name: 'gpstrackerclubs.index',
        component: () => import('@cruds/Gpstrackerclubs/Index.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/create',
        name: 'gpstrackerclubs.create',
        component: () => import('@cruds/Gpstrackerclubs/Create.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/:id',
        name: 'gpstrackerclubs.show',
        component: () => import('@cruds/Gpstrackerclubs/Show.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },
      {
        path: 'gpstrackerclubs/:id/edit',
        name: 'gpstrackerclubs.edit',
        component: () => import('@cruds/Gpstrackerclubs/Edit.vue'),
        meta: { title: 'cruds.gpstrackerclub.title' }
      },

      {
        path: 'golfclubfeedbacks',
        name: 'golfclubfeedbacks.index',
        component: () => import('@cruds/Golfclubfeedbacks/Index.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/create',
        name: 'golfclubfeedbacks.create',
        component: () => import('@cruds/Golfclubfeedbacks/Create.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/:id',
        name: 'golfclubfeedbacks.show',
        component: () => import('@cruds/Golfclubfeedbacks/Show.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },
      {
        path: 'golfclubfeedbacks/:id/edit',
        name: 'golfclubfeedbacks.edit',
        component: () => import('@cruds/Golfclubfeedbacks/Edit.vue'),
        meta: { title: 'cruds.golfclubfeedback.title' }
      },

      {
        path: 'investors',
        name: 'investors.index',
        component: () => import('@cruds/Investors/Index.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/create',
        name: 'investors.create',
        component: () => import('@cruds/Investors/Create.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/:id',
        name: 'investors.show',
        component: () => import('@cruds/Investors/Show.vue'),
        meta: { title: 'cruds.investor.title' }
      },
      {
        path: 'investors/:id/edit',
        name: 'investors.edit',
        component: () => import('@cruds/Investors/Edit.vue'),
        meta: { title: 'cruds.investor.title' }
      },

      {
        path: 'configurations',
        name: 'configurations.index',
        component: () => import('@cruds/Configurations/Index.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/create',
        name: 'configurations.create',
        component: () => import('@cruds/Configurations/Create.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/:id',
        name: 'configurations.show',
        component: () => import('@cruds/Configurations/Show.vue'),
        meta: { title: 'cruds.configuration.title' }
      },
      {
        path: 'configurations/:id/edit',
        name: 'configurations.edit',
        component: () => import('@cruds/Configurations/Edit.vue'),
        meta: { title: 'cruds.configuration.title' }
      }

    ]



  


  }
]

export default new VueRouter({
  mode: 'history',
  base: '/admin',
  routes
})

Please or to participate in this conversation.