You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling Url::default()->first() I get an error because the wrong class is typed in the scopeDefault() method.
Switch use Illuminate\Database\Query\Builder; for use Illuminate\Database\Eloquent\Builder; in the use statements.
Actual Behaviour:
> Lunar\Models\Url::default()->where('slug', 't-shirt')->first()
TypeError Lunar\Models\Url::scopeDefault(): Argument #1 ($query) must be of type Illuminate\Database\Query\Builder, Illuminate\Database\Eloquent\Builder given, called in vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 1631.
Steps To Reproduce:
\Lunar\Models\Url::default()->first();
The text was updated successfully, but these errors were encountered:
Awesome! I was going to send a PR myself, but was just wrapping up for the day when i discovered the bug, so I just created an issue and then I forgot about it 🙈
Expected Behaviour:
When calling
Url::default()->first()
I get an error because the wrong class is typed in thescopeDefault()
method.Switch
use Illuminate\Database\Query\Builder;
foruse Illuminate\Database\Eloquent\Builder;
in the use statements.Actual Behaviour:
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: