'boolean', 'is_protected' => 'boolean', ]; } /** * Get the users with this type. */ public function users() { return User::where('user_type', $this->name); } /** * Get all user types as a key-value array for select fields. * * @return \Illuminate\Database\Eloquent\Collection */ public static function getAllForSelect() { return self::orderBy('name')->get(); } }