Can laravel model be used with multiple tables?

learn to see a table corresponding to a model

but if I have a lot of tables

make the corresponding multi-model, of course, also OK

but I basically do the same thing on every model

can I use one model for multiple tables?

is it possible to communicate with DB for operation?

can you give me an example of how to do the code?

to avoid this problem

I use query builder to write DB:talbe () because this specifies table

I don"t know how to use one eloquent model to apply to multiple table
model::find () so that
then if the client can be create table, should the corresponding
automatically give create model automatic code?
feels that the authority is too great.
can create model. If you really need
, how can you query the relevant keywords of the code?

Feb.28,2021

No, a table must correspond to a model, unless you use DB:talbe ()

instead of model,.
Menu