Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Acme\Services;
- use App\Acme\Models\Hotel;
- use App\Acme\Resources\HotelResource;
- use App\Acme\Traits\ApiResponseTrait;
- class HotelService
- {
- use ApiResponseTrait;
- public function saveHotel($input)
- {
- $hotels = Hotel::create([
- 'title' => $input['title'],
- //'slug' => str_slug($input['title'], '-'),
- 'address' => $input['address'],
- 'description' => $input['description'],
- 'language_id' => $input['language_id'],
- 'city_id' => $input['city_id'],
- //'cover' => $imagem_nome,
- ]);
- // $hotels = Hotel::create($input);
- return new HotelResource($hotels);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement