-1

my question is totaly different from that question, in that question they are telling about php versions and all, that question didn't solved my issue, thats why I haved asked my own question. @Álvaro González

I have created 4 models with this command

php artisan make:model class
php artisan make:model student
php artisan make:model subject
php artisan make:model user

I have created migrations and everything, but the problem is when I test my models in php artisan tinker with this command App\student::all(); then subject user and student models are working and shows me data but App\class::all(); is not working and showing me this error

PHP Parse error, Unexpected T_CLASS, Expecting T_STRING

I have also migration for class and also data is present in class table in database, but I don't know why it's not working, Any help would be appreciated Thanks

Akhtar Munir
  • 1,691
  • 3
  • 11
  • 28

1 Answers1

0

This model is invalid:

class class extends Model
{
  //
}
Justin Schwimmer
  • 185
  • 1
  • 12
  • OP found that out already, that's why the question exists. A (short) explanation on why it is invalid would be nice and helpful. – brombeer Nov 21 '18 at 08:25
  • Boom, just saw that! I thought the visual aid of `class class` told the story... way to knock my peep in the ground yo. – Justin Schwimmer Nov 21 '18 at 08:27