Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Acme\Services;
  4. use App\Acme\Models\Hotel;
  5. use App\Acme\Resources\HotelResource;
  6. use App\Acme\Traits\ApiResponseTrait;
  7.  
  8. class HotelService
  9. {
  10. use ApiResponseTrait;
  11.  
  12. public function saveHotel($input)
  13. {
  14. $hotels = Hotel::create([
  15. 'title' => $input['title'],
  16. //'slug' => str_slug($input['title'], '-'),
  17. 'address' => $input['address'],
  18. 'description' => $input['description'],
  19. 'language_id' => $input['language_id'],
  20. 'city_id' => $input['city_id'],
  21. //'cover' => $imagem_nome,
  22. ]);
  23. // $hotels = Hotel::create($input);
  24. return new HotelResource($hotels);
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement