tzunghaor / settings-bundle

Symfony bundle for storing settings in database with editor GUI
MIT License
5 stars 1 forks source link

Settings Demo now available #6

Open tacman opened 2 years ago

tacman commented 2 years ago

I put together a Symfony 6 demo of this bundle: https://github.com/tacman/settings-bundle-demo

It's live on Heroku at https://settings-demo.herokuapp.com/

It uses my branch of this bundle. I'm happy to transfer the repo to you if you'd like.

Attributes are now supported! This makes the settings class very neat:

use Tzunghaor\SettingsBundle\Attribute\Setting;

class SiteSettings
{
    #[Setting]
    public string $version = "1.0.0";

    #[Setting('Tagline', help: "The company slogan")]
    public ?string $tagline = null;

    public string $title = "(title)";

    #[Setting]
    public bool $beta_features = false;

}

image

I am stuck on how to configure scope-specific attributes, like user and project, but was hoping with this demo we could show off this awesome bundle!