Route::bind PHP Метод

bind() публичный статический метод

Add a new route parameter binder.
public static bind ( string $key, string | callable $binder ) : void
$key string
$binder string | callable
Результат void
        public static function bind($key, $binder)
        {
            \Illuminate\Routing\Router::bind($key, $binder);
        }

Usage Example

 /**
  * Define your route model bindings, pattern filters, etc.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function boot(Router $router)
 {
     parent::boot($router);
     \Route::bind('articleslug', function ($value) {
         return \App\Article::where('slug', $value)->with('user')->with('writer')->with('screenshot.image')->firstOrFail();
     });
 }
All Usage Examples Of Route::bind