UploadController.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace App\Http\Controllers\Api\V1;
  3. use App\Http\Controllers\Controller;
  4. use Illuminate\Http\Request;
  5. use App\Facades\UploadFacade;
  6. class UploadController extends Controller
  7. {
  8. /**
  9. * Display a listing of the resource.
  10. *
  11. * @return \Illuminate\Http\Response
  12. */
  13. public function index()
  14. {
  15. //
  16. }
  17. /**
  18. * Store a newly created resource in storage.
  19. *
  20. * @param \Illuminate\Http\Request $request
  21. * @return \Illuminate\Http\Response
  22. */
  23. public function store(Request $request)
  24. {
  25. $file = $request->file('pic');
  26. $dst = $request->get('dst', 'pics');
  27. return UploadFacade::pic($file, $dst);
  28. }
  29. /**
  30. * Display the specified resource.
  31. *
  32. * @param int $id
  33. * @return \Illuminate\Http\Response
  34. */
  35. public function show($id)
  36. {
  37. //
  38. }
  39. /**
  40. * Update the specified resource in storage.
  41. *
  42. * @param \Illuminate\Http\Request $request
  43. * @param int $id
  44. * @return \Illuminate\Http\Response
  45. */
  46. public function update(Request $request, $id)
  47. {
  48. //
  49. }
  50. /**
  51. * Remove the specified resource from storage.
  52. *
  53. * @param int $id
  54. * @return \Illuminate\Http\Response
  55. */
  56. public function destroy($id)
  57. {
  58. //
  59. }
  60. }