I need to pass a model to a function, but seem that my solution is not correct because i receive below error from PHPStorm
expects parameter of type Illuminate\Database\Eloquent\Model, string given.
this an extract of my code:
/** Return the model structure
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param array $fillData
* @return object
*/
public static function fillBasicModelData(Model $model, $fillData){
...code...
}
And below is how I call the function:
$result = self::fillBasicModelData(Filter::class, $emptyFilter);
Obviously Filter is an Illuminate\Database\Eloquent\Model
so my question is how can I pass a model to a function without this warning?
thank you