I
I
iliyaisd2015-08-10 21:22:01
Laravel
iliyaisd, 2015-08-10 21:22:01

How to generate models from existing tables in Laravel5?

Subject. I found a command for generating models in general (php artisan make:model User), but they are empty. How to make it start looking at the DB? The tables exist, there is a connection with the database, the naming is taken into account.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2015-08-10
@iliyaisd

You don't need to generate anything. The model must be empty. There is a maximum that you can write $fillable and $table.
Nothing else is needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question