芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/app/Models/Role.php
where('role_id', $id)->pluck('permission_id'); } public function user() { return $this->hasOne(User::class, 'role_id'); } /** * Available user roles * * @return array */ public function availableUserRoles() : array { $merchantRole = self::where(['user_type' => 'User', 'customer_type' => 'merchant', 'is_default' => 'Yes'])->first(['id']); $userRole = self::where(['user_type' => 'User', 'customer_type' => 'user', 'is_default' => 'Yes'])->first(['id']); if ($merchantRole) { $types[] = "merchant"; } if ($userRole) { $types[] = "user"; } return $types; } }