mardi 3 décembre 2019

how to load vuejs component from laravel blade?

I'have multiple auth laravel dashboard. When i login the default page redirect me to the client dashboard blade. When i write something in client blade.It does not show anything.I am using vuejs routers. Everything is working perfect. I tried to call component in that blade but it's still showing blank .I want to redirect to dashboard component.

Controller: I tried it with the return url('url here') but still not working for me.

public function index()
    {
        return view('client');
    }


Client Blade:

@extends('layouts.master')
@section('content')

    Hello World

@endsection

Master Blade:

<ul>
  <li>
        <router-link to="/clientdashboard" title="dashboard">
         <span class="nav-link-text"><iclass="fal fa-user"></i>DashBoard</span>
        </router-link>
  </li>
</ul>

    <div class="page-content">
         <router-view>
         </router-view>
    </div>

App.js

let routes = [
    {path: '/clientdashboard', component: require('./components/clientdashboard.vue').default},
]


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire