Notice.php 512 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Repositories\Models\Info;
  3. use App\Repositories\Models\Base\Admin;
  4. use App\Repositories\Models\Model;
  5. class Notice extends Model
  6. {
  7. /**
  8. * @var string
  9. */
  10. protected $table = 'info_notices';
  11. protected $guarded = [];
  12. /**
  13. * The attributes excluded from the model's JSON form.
  14. *
  15. * @var array
  16. */
  17. protected $hidden = [];
  18. public function admin()
  19. {
  20. return $this->belongsTo(Admin::class)->select(['id', 'name', 'username']);
  21. }
  22. }