url() 공개 정적인 메소드

Admin url.
public static url ( $url ) : string
$url
리턴 string
예제 #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;
 }
예제 #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, '/')));
 }