setTable(plugin()->webman->config('database.role_table')); } /** * 部门 * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function department(){ return $this->belongsToMany(plugin()->webman->config('database.department_model'),plugin()->webman->config('database.role_department_model'), 'role_id', 'department_id'); } protected function setCheckStrictlyAttribute($value) { $this->attributes['check_strictly'] = (int)$value; } protected function getCheckStrictlyAttribute($value) { return (boolean)$value; } }