mkA~(@^_^@)~PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT p0 'datetime', 'password' => 'hashed' ]; protected $hidden = [ 'password', 'remember_token' ]; protected $fillable = [ 'email', 'email_verified_at', 'password', 'remember_token', 'mobile', 'type', 'vendor_id', 'product_access', 'role_name', 'branch_id', 'country_code', 'owner_name', 'country_id', 'status', 'product_access', 'dentist_id' ]; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->multiple_attachment = true; $this->multiple_attachment_usage = ['default', 'bdf-file']; } public function getImageAttribute() { return $this->attachmentRelation()->first(); } public function branches() { return $this->hasMany(Branch::class); } public function bankAccount() { return $this->hasOne(BankAccount::class); } public function favoriteProducts() { return $this->belongsToMany(Product::class, 'favourites')->withTimestamps(); } public function country() { return $this->belongsTo(Country::class, 'country_id'); } public function fcmTokens() { return $this->morphMany(FcmToken::class, 'user'); } public function createNewUser($request, $intiatedBy) { $user = new self(); if ($intiatedBy == 'user') { $user->type = $request->type; } $user->email = $request->email; $user->mobile = $request->mobile; $user->country_code = $request->country_code; $user->country_id = $request->country_id; $user->password = Hash::make($request->password); $user->type = $request->type; $user->owner_name = $request->owner_name; $user->save(); return $user; } public function EmBranch() { return $this->belongsTo(Branch::class , 'branch_id' , 'id'); } public function vendor(){ return $this->belongsTo(User::class , 'vendor_id'); } public function rfqs() { return $this->hasMany(RFQ::class); } }