Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

validation laravel

/**
 * Store a new blog post.
 *
 * @param  IlluminateHttpRequest  $request
 * @return IlluminateHttpResponse
 */
public function store(Request $request)
{
    $validated = $request->validate([
        'title' => 'required|unique:posts|max:255',
        'body' => 'required',
    ]);
 
    // The blog post is valid...
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #validation #laravel
ADD COMMENT
Topic
Name
7+4 =