Answer the question
In order to leave comments, you need to log in
I can not understand where the error is when outputting data?
Started learning Laravel. Actually here:
1) I did php artisan make: migration
2) I added the columns I needed in the files
php artisan migrate
3) I did php artisan make: model mobile
4) I added data to the table via php artisan tinker. I checked the table, everything was added
5) When I write App \ mobile:: all (); Gives an error - Base table or view not found .
I can't figure out where I went wrong. I did the same thing before and it worked. Help.
Answer the question
In order to leave comments, you need to log in
Most likely they messed up with the names.
In the model write
protected $table = 'Table name'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question