Laravel -Bildvalidierung
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
Optimus Grind
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
'item' => 'required|integer|between:1,10',
'email' => 'required|email|unique:users,email',
//@sujay
php artisan make:request User\CreateUserRequest
@if ($errors->any())
@foreach ($errors->all() as $error)
<div>{{$error}}</div>
@endforeach
@endif
/**
* Store a new blog post.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$validated = $request->validate([
'title' => 'required|unique:posts|max:255',
'body' => 'required',
]);
// The blog post is valid...
}