private function modelVision(Model $model, $where, $value, $name, $querymap = null) : Model
  {
    if (strpos($where, '__') !== false) {
      $querymap = explode('__', $where)[1];
      $field = explode('__', $where)[0];
    }

    if (isset(HttpFoundation::$routeModelBinding['model'][$querymap])) {
      return (new HttpFoundation::$routeModelBinding['model'][$querymap])->persist($model, $field, $value, $name);
    }

    return $model->where($where, $value)->first() ?? $model;
  }
private function modelVision(Model $model, $where, $value, $name, $querymap = null) : Model
  {
    if (strpos($where, '__') !== false) {
      $querymap = explode('__', $where)[1];
      $field = explode('__', $where)[0];
    }

    if (isset(HttpFoundation::$routeModelBinding['model'][$querymap])) {
      return (new HttpFoundation::$routeModelBinding['model'][$querymap])->persist($model, $field, $value, $name);
    }

    return $model->where($where, $value)->first() ?? $model;
  }
private function modelVision ( Model $ model , $ where , $ value , $ name , $ querymap = null ) : Model { if ( strpos ( $ where , '__' ) !== false ) { $ querymap = explode ( '__' , $ where ) [ 1 ] ; $ field = explode ( '__' , $ where ) [ 0 ] ; } if ( isset ( HttpFoundation :: $ routeModelBinding [ 'model' ] [ $ querymap ] ) ) { return ( new HttpFoundation :: $ routeModelBinding [ 'model' ] [ $ querymap ] ) -> persist ( $ model , $ field , $ value , $ name ) ; } return $ model -> where ( $ where , $ value ) -> first ( ) ?? $ model ; }
Run route model binding for models

@param Model $model
@param mixed $where
@param mixed $value
@param mixed $querymap
@return void
Run route model binding for models