Closed BaraoVlask closed 1 year ago
As the error suggests, your user model does not implement the Authticatable interface as Laravel requires.
As the error suggests, your user model does not implement the Authticatable interface as Laravel requires.
~This is out of the box behavior. Shouldn't this be mentioned in the setup documentation if it's a required preliminary step?~
Actually, I'm betting the OP is using blueprint to generate models, which replaces the built-in user, and does not include the correct stub.
@BaraoVlask compare your \App\Models\User
model to the one that Laravel ships with by default. If you are using Blueprint, use this instead:
use Filament\Models\Contracts\FilamentUser;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements FilamentUser
{
// ...
Package
filament/filament
Package Version
v2.17.24
Laravel Version
v10.7.1
Livewire Version
v2.12.3
PHP Version
8.1
Problem description
Return type error Filament\Commands\MakeUserCommand::createUser(): Return value must be of type Illuminate\Contracts\Auth\Authenticatable, App\Models\User returned
Expected behavior
create a user without errors
Steps to reproduce
install laravel install filament run php artisan make:filament-user
Reproduction repository
https://github.com/no-need
Relevant log output