package installer
This commit is contained in:
23
app/Helpers/Installer/functions.php
Executable file
23
app/Helpers/Installer/functions.php
Executable file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
if (! function_exists('isActive')) {
|
||||
/**
|
||||
* Set the active class to the current opened menu.
|
||||
*
|
||||
* @param string|array $route
|
||||
* @param string $className
|
||||
* @return string
|
||||
*/
|
||||
function isActive($route, $className = 'active')
|
||||
{
|
||||
if (is_array($route)) {
|
||||
return in_array(Route::currentRouteName(), $route) ? $className : '';
|
||||
}
|
||||
if (Route::currentRouteName() == $route) {
|
||||
return $className;
|
||||
}
|
||||
if (strpos(URL::current(), $route)) {
|
||||
return $className;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user