Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel view-model

class PostsController
{
    public function update(Request $request, Post $post)
    {
        // …
        
        return (new PostViewModel($post))->view('post.form');
    }
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #laravel
ADD COMMENT
Topic
Name
1+3 =