You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
935 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
  4. use Illuminate\Foundation\Bus\DispatchesJobs;
  5. use Illuminate\Foundation\Validation\ValidatesRequests;
  6. use Illuminate\Routing\Controller as BaseController;
  7. class BucketController extends BaseController
  8. {
  9. use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
  10. public function get()
  11. {
  12. }
  13. /**
  14. *
  15. * @return [type] [description]
  16. *
  17. */
  18. public function create()
  19. {
  20. return view('bucket.create');
  21. }
  22. public function store()
  23. {
  24. $validated = request()->validate([
  25. 'title' => 'required|max:255',
  26. 'is_public' => 'boolean',
  27. ]);
  28. if ($validated) {
  29. return redirect()
  30. ->route('bucket.get', ['uuid' => 12]);
  31. } else {
  32. return back()
  33. ->withInput();
  34. }
  35. }
  36. }