Created
February 25, 2017 11:24
-
-
Save jeystaats/b0de790065f01963a2e07e4d9ea46c66 to your computer and use it in GitHub Desktop.
Return active string if a route is active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function set_active($path) { | |
if (strpos(\Request::route()->getName(), $path) !== false) { | |
return 'active'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment