Laravel request parameter encapsulation?

WBOY
Release: 2016-09-02 08:57:04
Original
1264 people have browsed it

Some mvc frameworks under java and .net platforms have the following features:

Form data:

<code>user.name:'admin',
user.pwd:'123'</code>
Copy after login
Copy after login

mvc framework interface method

<code class="java">public String add(User user){
    ...
}</code>
Copy after login
Copy after login

The mvc framework will encapsulate the parameters in the request into the user parameter of the add method. Are there any related features in laravel? How to achieve?

Reply content:

Some mvc frameworks under java and .net platforms have the following features:

Form data:

<code>user.name:'admin',
user.pwd:'123'</code>
Copy after login
Copy after login

mvc framework interface method

<code class="java">public String add(User user){
    ...
}</code>
Copy after login
Copy after login

The mvc framework will encapsulate the parameters in the request into the user parameter of the add method. Are there any related features in laravel? How to achieve?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template