File: /var/www/vhost/disk-apps/qas.sports-crowd.com/app/UserInformation.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Sucursal;
use App\User;
use App\CourierCompany;
use Illuminate\Database\Eloquent\SoftDeletes;
class UserInformation extends Model
{
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $table = 'user_informations';
protected $guarded = ['id', 'created_at', 'updated_at'];
protected $fillable = [
'id',
'photo',
'photo_social',
'social_id',
'social_provider',
'social_token',
'plate',
'version',
'model',
'uid_phone',
'current_db',
'sex',
'dob',
'referred_code',
'referred_user_code',
'referred_finish_date',
'is_initial',
'is_tutorial_viewed',
'is_habeas_data_viewed',
'courier_company_id',
'sucursal_id',
'user_id',
'current_sucursal_id',
'created_at',
'updated_at',
];
public function sucursal()
{
return $this->belongsTo(Sucursal::class, "sucursal_id")->withTrashed();
}
public function company()
{
return $this->belongsTo(CourierCompany::class, "courier_company_id");
}
public function userInfo()
{
return $this->belongsTo(User::class);
}
public function user()
{
return $this->belongsTo(User::class, "user_id");
}
}