Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Show the form for creating a new resource.
  5. *
  6. * @return IlluminateHttpResponse
  7. */
  8. public function create()
  9. {
  10. //
  11. return view('contacts.create');
  12. }
  13.  
  14. /**
  15. * Store a newly created resource in storage.
  16. *
  17. * @param IlluminateHttpRequest $request
  18. * @return IlluminateHttpResponse
  19. */
  20. public function store(contactsrequest $request)
  21. {
  22. //contacts model
  23. contacts::create($request->all());
  24. return redirect()->route('contacts.index')->with('message', 'Contacts has been added successfully');
  25. }
  26.  
  27. /**
  28. * Display the specified resource.
  29. *
  30. * @param int $id
  31. * @return IlluminateHttpResponse
  32. */
  33. public function show($id)
  34. {
  35. //
  36. }
  37.  
  38. /**
  39. * Show the form for editing the specified resource.
  40. *
  41. * @param int $id
  42. * @return IlluminateHttpResponse
  43. */
  44. public function edit(contacts $contacts)
  45. {
  46. //
  47.  
  48. return view('contacts.edit', compact('contacts'));
  49. }
  50.  
  51. /**
  52. * Update the specified resource in storage.
  53. *
  54. * @param IlluminateHttpRequest $request
  55. * @param int $id
  56. * @return IlluminateHttpResponse
  57. */
  58. public function update(contactsrequest $request, contacts $contacts)
  59. {
  60. //
  61. $contacts->update($request->all());
  62. return redirect()->route('contacts.index')->with('message', 'Contacts has been updated successfully');
  63.  
  64. }
  65.  
  66. /**
  67. * Remove the specified resource from storage.
  68. *
  69. * @param int $id
  70. * @return IlluminateHttpResponse
  71. */
  72. public function destroy($id)
  73. {
  74. //
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement