validate([ 'name' => 'required|max:255', 'description' => 'max:255', 'path' => 'present', 'is_public' => 'boolean', ]); if ($validated) { $bucket = Bucket::create($validated); return redirect() ->route('bucket.single', ['uuid' => 12]); } else { return back() ->withInput(); } } }