12345678910111213141516171819 |
- <?php
- namespace App\Models;
- # use Illuminate\Database\Eloquent\Model;
- class HrSection extends Model
- {
- protected $table = 'hr_section';
- public function pro()
- {
- return $this->hasOne(Pro::class, 'id', 'pro_id');
- }
- public function changes() {
- return $this->hasMany(HrSectionChange::class, 'hr_section_id')->orderBy('created_at', 'DESC');
- }
- }
|