Skip to content

Request

  1. Do not use the authorize() method in Form Request classes. Handle authorization in controllers or dedicated classes.
  2. To get data from the URI query, use $request->query(...) instead of $request->input(...) and $request->get(...)
  3. Prefer using type-aware get methods:
    • $request->integer(...)
    • $request->float(...)
    • $request->array(...)
    • Do not use ~$request->string(...)~: it returns Str instance, do not use it (it's also inconsistent with other Laravel API like Config::string())