Form Request

A Form Request is a class dedicated to validating a request. It contains rules() for the rules and authorize() for authorization, which keeps controllers light. Type-hinted in the controller method, it runs before it.

Example

public function store(StoreProduitRequest $request)
{
  Produit::create($request->validated());
}

Related concepts

The whole glossary