芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/yeahea.digitalhubbd.com/app/Models/DeliveryBoy.php
belongsTo(Shop::class, 'shop_id'); } /** * This method will make hash password. * * @return [hash_password] */ public function setPasswordAttribute($password) { $this->attributes['password'] = Hash::needsRehash($password) ? Hash::make($password) : $password; } /** * Scope a query to only include inactive records. * * @return \Illuminate\Database\Eloquent\Builder */ public function scopeActive($query) { return $query->where('status', '==', BaseModel::ACTIVE); } /** * Scope a query to only include records from the users shop. * * @return \Illuminate\Database\Eloquent\Builder */ public function scopeMine($query) { return $query->where('shop_id', Auth::user()->merchantId()); } }