public static function generate_options($root = null)
	{
		if ($root === null)
		{
			$root = static::query()
				->where('id', 1)
				->get_one();
		}

		$return = [];

		if ($root)
		{
			foreach ($root->children()->get() as $model)
			{
				if ($model->has_children())
				{
					$return[$model->name] = static::generate_options($model);
				}
				else
				{
					$return[$model->id] = $model->name;
				}
			}
		}

		return $return;
	}