path); return view('bucket.single', [ 'bucket' => $bucket, 'files' => $results ]); } /** * * * @return [type] [description] * */ public function create() { return view('bucket.create'); } /** * * */ public function store() { $validated = request()->validate([ 'name' => 'required|max:255', 'description' => 'max:255', 'path' => 'present', 'is_public' => 'boolean', ]); if ($validated) { // create bucket $bucket = Bucket::create($validated); return redirect() ->route('bucket.single', [ 'id' => $bucket->id ]); } else { return back() ->withInput(); } } }