A
A
Alexander Burn2017-05-02 22:44:19
Laravel
Alexander Burn, 2017-05-02 22:44:19

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

1 answer(s)
D
DeadMemories, 2017-05-02
@Flaminglove

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 question

Ask a Question

731 491 924 answers to any question