File manager - Edit - /var/www/html/homologBancodetalentos/app/Http/Services/TalentBank/Candidate/CourseService.php
Back
<?php namespace App\Http\Services\TalentBank\Candidate; use App\Http\Services\BaseService; use App\Models\TalentBank\Candidate; use App\Models\TalentBank\Candidate\Course; use Illuminate\Database\Eloquent\Collection; use Illuminate\Http\Request; class CourseService extends BaseService { protected $model = Course::class; public function index(Request $request): Collection { return Course::query() ->where('candidate_id', $request->talentBankUser->id) ->get(); } public function store(Request $request, Candidate $candidate): Course { $newCourse = $candidate->courses()->create($request->all()); $newCourse->refresh(); return $newCourse; } public function show(Course $course): Course { return $course; } public function update(array $data, Course $course): Course { $course->fill($data); $course->save(); return $course; } public function destroy(Course $course): bool { $course->delete(); return true; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings