32 lines
636 B
PHP
32 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Server\MerchantUserPhoto;
|
|
use App\Models\Server\MerchantUserProfile;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Actuallymab\LaravelComment\CanComment;
|
|
|
|
class MerchantUsers extends Model
|
|
{
|
|
use CanComment;
|
|
protected $fillable = [];
|
|
protected $guarded = [];
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
public function profile()
|
|
{
|
|
return $this->hasOne(MerchantUserProfile::class, "user_id", "id");
|
|
}
|
|
|
|
public function photos()
|
|
{
|
|
return $this->hasMany(MerchantUserPhoto::class, "user_id", "id");
|
|
}
|
|
|
|
|
|
}
|