2017 © Pedro Peláez
 

library laravel-active

Helper to check if the current route is active.

image

tijdmachine/laravel-active

Helper to check if the current route is active.

  • Sunday, January 21, 2018
  • by imbue
  • Repository
  • 0 Watchers
  • 1 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Active

Latest Stable Version Total Downloads License, (*1)

Laravel Active is a package for Laravel that makes it easy to recognize if the current path or route is active., (*2)

Requirements

  • Laravel >=5.5

Installation

Add Laravel Active to your composer file via the composer require command, (*3)

$ composer require imbue/laravel-active

Laravel 5.5 uses Package Auto-Discovery, so does not require you to manually add the ServiceProvider., (*4)

Publish the config file to your local config folder, (*5)

$ php artisan vendor:publish --tag=laravel-active

Usage

// by path
{{ active('articles') }}
{{ active('articles/*') }}
{{ active(['articles', 'articles/*']) }}

// by route name
{{ active('articles.*') }}
{{ active(['articles', 'articles.*']) }}

Example

<ul class="navbar-nav">
    <li class="nav-item {{ active(['blog', 'blogs/*']) }}">
        <a class="nav-link" href="#">Blog</a>
    </li>
</ul>

Credits

This package is based on Active by dwightwatson and stripped down/changed to personal preference., (*6)

The Versions

21/01 2018

dev-master

9999999-dev

Helper to check if the current route is active.

  Sources   Download

MIT

The Requires

 

laravel route active

14/01 2018

1.0.0

1.0.0.0

Helper to check if the current route is active.

  Sources   Download

MIT

The Requires

 

laravel route active