Request::path PHP Method

path() public static method

Get the current path info for the request.
public static path ( ) : string
return string
        public static function path()
        {
            return \Illuminate\Http\Request::path();
        }

Usage Example

Example #1
0
/**
 * Help in setting the class of the active link to 'active'
 * If another class is required,
 * pass a third parameter of class name
 * @param $path
 * @param string $secondPath
 * @param string $active
 * @return string
 */
function set_active($path, $secondPath = '', $active = 'active')
{
    if ($path == 'admin/search' && strpos(Request::path(), 'admin/search') !== false) {
        return $active;
    }
    return Request::is($path) || Request::is($secondPath) ? $active : '';
}
All Usage Examples Of Request::path