In the route, a variable {posts} is passed in. The variable name must be like this. If it is not changed to something else, it will be wrong.
Run to the corresponding controller why this post became a Post model
Specific code
https://github.com/Vuedo/vued...
https://github.com/Vuedo/vued...
为情所困2017-05-16 16:52:21
That’s 路由-模型绑定
. To put it simply, Laravel first uses the id you passed in to find such a record in the database, then instantiates it into the corresponding model and then injects it into the controller.
Documentation: https://laravel.com/docs/5.3/...