Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

romulo27's avatar

Problem with $fillable

Every time I make a seed, it shows me this error in Model / Company. What is the solution to this error?


   Symfony\Component\Debug\Exception\FatalThrowableError  : syntax error, unexpected 'protected' (T_PROTECTED), expecting identifier (T_STRING) or namespace (T_NAMESPACE) or \ (T_NS_SEPARATOR)

  at /home/vagrant/Projetos/src/pc4-champs-backend/app/Models/Company.php:39
    35| 
    36|     use Notifiable,
    37| 
    38| 
  > 39|      protected $fillable = [
    40|         'name',
    41|         'slug',
    42|         'cnpj',
    43|         'display_name',

  Exception trace:

  1   Composer\Autoload\includeFile("/home/vagrant/Projetos/src/pc4-champs-backend/vendor/composer/../../app/Models/Company.php")
      /home/vagrant/Projetos/src/pc4-champs-backend/vendor/composer/ClassLoader.php:322

  2   Composer\Autoload\ClassLoader::loadClass("App\Models\Company")
      [internal]:0

  Please use the argument -v to see more details.
`` `

class Company extends BaseModel {

use Notifiable,


 protected $fillable = [
    'name',
    'slug',
    'cnpj',
    'display_name',
    'description',
    'resume',
    'email',
    'site_url',
    'address',
    'photo_url',
    'phone_number',
    'phone_mobile',
    'address_number',
    'address_complement',
    'district',
    'zip_code',
    'city_id',
    'user_id',
    'profile_id',
];```
0 likes
3 replies
Cronix's avatar
Cronix
Best Answer
Level 67

change comma to semicolon in use notifiable;

1 like

Please or to participate in this conversation.