123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <?php
- namespace App\Http\Controllers\Client;
- use App\Http\Controllers\Controller;
- use App\Services\Client\CoachLocationService;
- use Illuminate\Http\Request;
- class CoachLocationController extends Controller
- {
- protected $coachLocationService;
-
- public function __construct(CoachLocationService $coachLocationService)
- {
- $this->coachLocationService = $coachLocationService;
- }
-
- public function index()
- {
- return $this->coachLocationService->getAllLocations();
- }
-
- public function store(Request $request)
- {
- return $this->coachLocationService->createLocation($request->all());
- }
-
- public function destroy(Request $request)
- {
- $type = $request->type;
- $coachId = $request->coach_id;
- return $this->coachLocationService->deleteLocation($coachId, $type);
- }
- }
|