ownedVia() public static method

Register an attribute/callback to determine if a model is owned by a given authority.
public static ownedVia ( string | Closure $model, string | Closure | null $attribute = null ) : void
$model string | Closure
$attribute string | Closure | null
return void
Example #1
0
 /**
  * Register an attribute/callback to determine if a model is owned by a given authority.
  *
  * @param  string|\Closure  $model
  * @param  string|\Closure|null  $attribute
  * @return void
  */
 public function ownedVia($model, $attribute = null)
 {
     Models::ownedVia($model, $attribute);
     return $this;
 }