CompanyController.php 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Http\Requests\Company\StoreCompanyRequest;
  4. use App\Models\Company;
  5. use Illuminate\Http\Request;
  6. class CompanyController 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. * Show the form for creating a new resource.
  19. *
  20. * @return \Illuminate\Http\Response
  21. */
  22. public function create()
  23. {
  24. //
  25. }
  26. /**
  27. * Store a newly created resource in storage.
  28. *
  29. * @param \Illuminate\Http\Request $request
  30. * @return \Illuminate\Http\Response
  31. */
  32. public function store(StoreCompanyRequest $request)
  33. {
  34. Company::truncate();
  35. Company::create($request->validated());
  36. return back()->with("success", __("messages.success.store.company"));
  37. }
  38. /**
  39. * Display the specified resource.
  40. *
  41. * @param \App\Models\Company $company
  42. * @return \Illuminate\Http\Response
  43. */
  44. public function show(Company $company)
  45. {
  46. //
  47. }
  48. /**
  49. * Show the form for editing the specified resource.
  50. *
  51. * @param \App\Models\Company $company
  52. * @return \Illuminate\Http\Response
  53. */
  54. public function edit(Company $company)
  55. {
  56. //
  57. }
  58. /**
  59. * Update the specified resource in storage.
  60. *
  61. * @param \Illuminate\Http\Request $request
  62. * @param \App\Models\Company $company
  63. * @return \Illuminate\Http\Response
  64. */
  65. public function update(Request $request, Company $company)
  66. {
  67. //
  68. }
  69. /**
  70. * Remove the specified resource from storage.
  71. *
  72. * @param \App\Models\Company $company
  73. * @return \Illuminate\Http\Response
  74. */
  75. public function destroy(Company $company)
  76. {
  77. //
  78. }
  79. }