url() public static method

Admin url.
public static url ( $url ) : string
$url
return string
Ejemplo n.º 1
0
 /**
  * Determine if the request has a URI that should pass through verification.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return bool
  */
 protected function shouldPassThrough($request)
 {
     $excepts = [Admin::url('auth/login'), Admin::url('ayth/logout')];
     foreach ($excepts as $except) {
         if ($except !== '/') {
             $except = trim($except, '/');
         }
         if ($request->is($except)) {
             return true;
         }
     }
     return false;
 }
Ejemplo n.º 2
0
 /**
  * Get current resource route url.
  *
  * @return string
  */
 public function resource()
 {
     $route = app('router')->current();
     $prefix = $route->getPrefix();
     $resource = trim(str_replace($prefix, '', $route->getUri()), '/') . '/';
     return Admin::url(substr($resource, 0, strpos($resource, '/')));
 }