Файловый менеджер - Редактировать - /home/clickysoft/public_html/rgr.clickysoft.net/app/Models/PracticeSpeciality.php
Назад
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class PracticeSpeciality extends Model { use HasFactory; public $timestamps = false; protected $primaryKey = 'practice_id'; protected $fillable = [ 'practice_id', 'speciality_id', ]; public static function getByPracticeId($practice_id) { return self::query()->where('practice_id', $practice_id)->get(); } public static function getByPracticeIdToSpecialityIds($practice_id) { return self::query()->where('practice_id', $practice_id)->pluck('speciality_id'); } public static function getByPracticeAndSpeciality($practice_id,$speciality_id) { return self::query()->where('practice_id', $practice_id)->where('speciality_id', $speciality_id)->first(); } public static function getBySpeciality($speciality_id) { return self::query()->where('speciality_id', $speciality_id)->get(); } public function specialityPractice() { return $this->belongsToMany(Practice::class, 'id', 'practice_id'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка