letrunghieu / active

The helper class for Laravel applications to get active class base on current route
https://www.hieule.info/tag/laravel-active/
MIT License
414 stars 83 forks source link

only return '1' if match pattern #29

Closed shinnlu closed 8 years ago

shinnlu commented 8 years ago

my code `

  • Dashboard
  • output

  • Dashboard
  • ` why it's return '1' not 'active'

    shinnlu commented 8 years ago

    i found the solution: active_class(if_uri_pattern(['admin']), 'active', '') but how to set default output to 'active' and empty

    letrunghieu commented 8 years ago

    I'm sorry for responding late. It's great that you found the solution. I updated the README file so that the "Usage" section become more noticeable. If you're new to this package, this page can tell you how to use "Active".