Get the fillable attributes for the model.
public getFillable ( ) : array | ||
return | array |
class User extends Illuminate\Database\Eloquent\Model { protected $fillable = ['name', 'email', 'password']; } $user = new User(); $fillableAttributes = $user->getFillable(); // ['name', 'email', 'password']
$user = User::find(1); $fillableAttributes = $user->getFillable();The `getFillable` method is part of the Laravel framework's Eloquent ORM, which provides a powerful way to interact with databases in PHP.