Can eloquent ignore irrelevant data in Laravel 4

后端 未结 4 826
长发绾君心
长发绾君心 2021-01-27 10:33

I have a form that accepts data which will be used to create two new database table entries. The form takes both the users details and their address. The user details will be st

4条回答
  •  执念已碎
    2021-01-27 11:09

    Have you tried looking at Input::only('field1','field2',...);, or even Input::except('field3')? They should be able to accomplish what you are looking for.

    Source: http://laravel.com/docs/requests

提交回复
热议问题