123456789101112131415161718192021222324252627 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Address extends Model
- {
- protected $table = 'address';
- public $timestamps=false;
- protected $fillable=['provice','city','area','con_name','con_mobile','address','uid'];
- protected $hidden=['status'];
- public function user()
- {
- return $this->belongsTo(User::class,'uid');
- }
- public function users()
- {
- return $this->belongsTo(User::class,'mobile','mobile');
- }
- public function get_user(){
- return $this->belongsTo(User::class,'mobile','mobile')->whereIn('cert_status',[3,6]);
- }
- }
|