@@ -34,8 +34,8 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function title() |
| 36 | 36 | { |
| 37 | - return ($this->husband ? $this->husband->fullname() : '?'). |
|
| 38 | - ' + '. |
|
| 37 | + return ($this->husband ? $this->husband->fullname() : '?') . |
|
| 38 | + ' + ' . |
|
| 39 | 39 | ($this->wife ? $this->wife->fullname() : '?'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | } |
| 26 | 26 | public function type() |
| 27 | 27 | { |
| 28 | - return $this->hasMany(Type::class,'id','type_id'); |
|
| 28 | + return $this->hasMany(Type::class, 'id', 'type_id'); |
|
| 29 | 29 | } |
| 30 | 30 | public function addr() |
| 31 | 31 | { |
| 32 | - return $this->hasMany(Addr::class,'id','addr_id'); |
|
| 32 | + return $this->hasMany(Addr::class, 'id', 'addr_id'); |
|
| 33 | 33 | } |
| 34 | 34 | } |
@@ -15,67 +15,67 @@ |
||
| 15 | 15 | use Spatie\MediaLibrary\Models\Media; |
| 16 | 16 | |
| 17 | 17 | class User extends Authenticatable implements MustVerifyEmail { |
| 18 | - use HasFactory, Notifiable, HasApiTokens, Billable, HasRoles; |
|
| 18 | + use HasFactory, Notifiable, HasApiTokens, Billable, HasRoles; |
|
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * The attributes that are mass assignable. |
|
| 22 | - * |
|
| 23 | - * @var array |
|
| 24 | - */ |
|
| 25 | - protected $fillable = [ |
|
| 26 | - 'first_name', |
|
| 27 | - 'last_name', |
|
| 28 | - 'email', |
|
| 29 | - 'password', |
|
| 30 | - ]; |
|
| 31 | - protected $connection = 'landlord'; |
|
| 20 | + /** |
|
| 21 | + * The attributes that are mass assignable. |
|
| 22 | + * |
|
| 23 | + * @var array |
|
| 24 | + */ |
|
| 25 | + protected $fillable = [ |
|
| 26 | + 'first_name', |
|
| 27 | + 'last_name', |
|
| 28 | + 'email', |
|
| 29 | + 'password', |
|
| 30 | + ]; |
|
| 31 | + protected $connection = 'landlord'; |
|
| 32 | 32 | |
| 33 | - public function sendPasswordResetNotification($token) { |
|
| 34 | - // Your your own implementation. |
|
| 35 | - $this->notify(new ResetPasswordNotification($token)); |
|
| 36 | - } |
|
| 33 | + public function sendPasswordResetNotification($token) { |
|
| 34 | + // Your your own implementation. |
|
| 35 | + $this->notify(new ResetPasswordNotification($token)); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * The attributes that should be hidden for arrays. |
|
| 40 | - * |
|
| 41 | - * @var array |
|
| 42 | - */ |
|
| 43 | - protected $hidden = [ |
|
| 44 | - 'password', |
|
| 45 | - 'remember_token', |
|
| 46 | - ]; |
|
| 38 | + /** |
|
| 39 | + * The attributes that should be hidden for arrays. |
|
| 40 | + * |
|
| 41 | + * @var array |
|
| 42 | + */ |
|
| 43 | + protected $hidden = [ |
|
| 44 | + 'password', |
|
| 45 | + 'remember_token', |
|
| 46 | + ]; |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * The attributes that should be cast to native types. |
|
| 50 | - * |
|
| 51 | - * @var array |
|
| 52 | - */ |
|
| 53 | - protected $casts = [ |
|
| 54 | - 'email_verified_at' => 'datetime', |
|
| 55 | - ]; |
|
| 48 | + /** |
|
| 49 | + * The attributes that should be cast to native types. |
|
| 50 | + * |
|
| 51 | + * @var array |
|
| 52 | + */ |
|
| 53 | + protected $casts = [ |
|
| 54 | + 'email_verified_at' => 'datetime', |
|
| 55 | + ]; |
|
| 56 | 56 | |
| 57 | - public function providers() { |
|
| 58 | - return $this->hasMany(Provider::class, 'user_id', 'id'); |
|
| 59 | - } |
|
| 57 | + public function providers() { |
|
| 58 | + return $this->hasMany(Provider::class, 'user_id', 'id'); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - public function userStartedChats() { |
|
| 62 | - return $this->hasMany(Chat::class, 'user_1')->join('users as partner', 'user_2', '=', 'partner.id'); |
|
| 63 | - } |
|
| 61 | + public function userStartedChats() { |
|
| 62 | + return $this->hasMany(Chat::class, 'user_1')->join('users as partner', 'user_2', '=', 'partner.id'); |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - public function userNotStartedChats() { |
|
| 66 | - return $this->hasMany(Chat::class, 'user_2')->join('users as partner', 'user_1', '=', 'partner.id'); |
|
| 67 | - } |
|
| 65 | + public function userNotStartedChats() { |
|
| 66 | + return $this->hasMany(Chat::class, 'user_2')->join('users as partner', 'user_1', '=', 'partner.id'); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - public function userChats() { |
|
| 70 | - return $this->userStartedChats->merge($this->userNotStartedChats); |
|
| 71 | - } |
|
| 72 | - public function Company() { |
|
| 73 | - return $this->belongsToMany(Company::class, 'user_company'); |
|
| 69 | + public function userChats() { |
|
| 70 | + return $this->userStartedChats->merge($this->userNotStartedChats); |
|
| 71 | + } |
|
| 72 | + public function Company() { |
|
| 73 | + return $this->belongsToMany(Company::class, 'user_company'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - public function sendEmailVerificationNotification() { |
|
| 76 | + public function sendEmailVerificationNotification() { |
|
| 77 | 77 | |
| 78 | - return $this->notify(new VerifyNotification()); |
|
| 78 | + return $this->notify(new VerifyNotification()); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | } |
@@ -50,6 +50,6 @@ |
||
| 50 | 50 | } |
| 51 | 51 | public function place() |
| 52 | 52 | { |
| 53 | - return $this->hasMany(Place::class,'id','places_id'); |
|
| 53 | + return $this->hasMany(Place::class, 'id', 'places_id'); |
|
| 54 | 54 | } |
| 55 | 55 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | class Type extends Model |
| 9 | 9 | { |
| 10 | 10 | use HasFactory; |
| 11 | - protected $fillable = ['name', 'description','is_active']; |
|
| 11 | + protected $fillable = ['name', 'description', 'is_active']; |
|
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * @var array |
| 12 | 12 | */ |
| 13 | - protected $fillable = ['name', 'description','company_id','current_tenant']; |
|
| 13 | + protected $fillable = ['name', 'description', 'company_id', 'current_tenant']; |
|
| 14 | 14 | |
| 15 | 15 | protected $connection = 'landlord'; |
| 16 | 16 | public function company() |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | protected static function boot() { |
| 17 | 17 | parent::boot(); |
| 18 | 18 | |
| 19 | - static::creating(function ($category) { |
|
| 19 | + static::creating(function($category) { |
|
| 20 | 20 | $category->slug = Str::slug($category->name); |
| 21 | 21 | }); |
| 22 | 22 | } |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | |
| 7 | 7 | class Role extends BaseRole |
| 8 | 8 | { |
| 9 | - protected $connection = 'landlord'; |
|
| 9 | + protected $connection = 'landlord'; |
|
| 10 | 10 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function addr() |
| 38 | 38 | { |
| 39 | - return $this->belongsTo(Addr::class); |
|
| 39 | + return $this->belongsTo(Addr::class); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | |