jeudi 12 octobre 2017

How to know which route is being accessed in laravel?

I'm starting a project php with Laravel framework 5!

I need to make a section in my project laravel for a dashboard to know which page is visited by the user.

Example: Menu Dashboard [Home -> Profile -> Settings -> Account ]

And i need know what is visited and show to user: ex: Dashboard -> Home

The question is, I use the Blade template of laravel to maker my fixed layout page and use for the other views pages. how to know which view is being accessed to mark in my blade layout?

<html>
    <head>
        <title>DashBoard</title>
    </head>
    <body>

        @section('sidebar')
        <section id="breadcrumb">
          <div class="container">
            <ol class="breadcrumb">
              <li><a href="dashboard.html">Dashboard</a></li>
              <li><a href="profile.html">Profile</a></li>
              <li><a href="settings.html">Settings</a></li>
              <li><a href="account.html">Account</a></li>
            </ol>
          </div>
       </section>
        @show

        <div class="container">
            @yield('content')
        </div>
    </body>
</html>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire