Section.php 468 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class Section extends Model
  5. {
  6. protected $table = 'section';
  7. public function sectionTemplate() {
  8. return $this->hasOne(SectionTemplate::class, 'id', 'section_template_id');
  9. }
  10. public function note() {
  11. return $this->hasOne(Note::class, 'id', 'note_id');
  12. }
  13. public function client() {
  14. return $this->hasOne(Section::class, 'id', 'client_id');
  15. }
  16. }