UserController.php 1.3 KB

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