protected function substituteImplicitBindings( $route )
	{
		$parameters = $route->parameters();

		foreach ( $route->signatureParameters( Model::class ) as $parameter )
		{
			$class = $parameter->getClass();

			if ( array_key_exists( $parameter->name, $parameters ) && !$route->getParameter( $parameter->name ) instanceof Model )
			{
				$method = $parameter->isDefaultValueAvailable() ? 'first' : 'firstOrFail';

				$model = $class->newInstance();

				$route->setParameter( $parameter->name, $model->where( $model->getRouteKeyName(), $parameters[$parameter->name] )->{$method()} );
			}
		}
	}
protected function substituteImplicitBindings( $route )
	{
		$parameters = $route->parameters();

		foreach ( $route->signatureParameters( Model::class ) as $parameter )
		{
			$class = $parameter->getClass();

			if ( array_key_exists( $parameter->name, $parameters ) && !$route->getParameter( $parameter->name ) instanceof Model )
			{
				$method = $parameter->isDefaultValueAvailable() ? 'first' : 'firstOrFail';

				$model = $class->newInstance();

				$route->setParameter( $parameter->name, $model->where( $model->getRouteKeyName(), $parameters[$parameter->name] )->{$method()} );
			}
		}
	}
protected function substituteImplicitBindings ( $ route ) { $ parameters = $ route -> parameters ( ) ; foreach ( $ route -> signatureParameters ( Model :: class ) as $ parameter ) { $ class = $ parameter -> getClass ( ) ; if ( array_key_exists ( $ parameter -> name , $ parameters ) && ! $ route -> getParameter ( $ parameter -> name ) instanceof Model ) { $ method = $ parameter -> isDefaultValueAvailable ( ) ? 'first' : 'firstOrFail' ; $ model = $ class -> newInstance ( ) ; $ route -> setParameter ( $ parameter -> name , $ model -> where ( $ model -> getRouteKeyName ( ) , $ parameters [ $ parameter -> name ] ) -> { $ method ( ) } ) ; } } }
Substitute the implicit Eloquent model bindings for the route.

@param  Route $route
Substitute the implicit Eloquent model bindings for the route .