1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Models;
- use App\Search\Traits\ShuoboSearchable;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Illuminate\Database\Eloquent\Model;
- class MemberShuobo extends Model
- {
- use SoftDeletes,ShuoboSearchable;
- protected $table = 'members_shuobo';
- protected $guarded = [];
- public function resumes()
- {
- return $this->hasMany(Resume::class, 'uid', 'uid');
- }
- public function members()
- {
- return $this->belongsTo(Member::class, 'uid');
- }
- public function toSearchableArray()
- {
- return $this->toArray();
- return [
- 'realname' => $this->realname,
- 'mobile' => $this->mobile,
- 'education' => $this->education,
- 'school' => $this->school,
- 'pro' => $this->pro,
- 'address' => $this->address,
- 'trade_type' => $this->trade_type
- ];
- }
- }
|