travel/service/app/model/Announcements.php

11 lines
244 B
PHP

<?php
namespace app\model;
class Announcements extends base
{
protected $table = 'announcements';
public function adminInfo() {
return $this->belongsTo(Admins::class, 'admin_id')->visible(['name','username','avatar']);
}
}