RacoonMittens
RacoonMittens
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
so I can't get to the settings page (without commenting out a block of code in the middleware) to even save the blank version
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
My issue is that I am trying to check this setting in a generic page middleware that populates some nav elements
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
If I save the form with an empty browser it works fine, but up until that point I get errors from retrieving that setting
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
Think I'll just stick with my custom facade wrapper for now
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
oh actually that boot block doesn't work 🤔
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
thanks for the help
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
Ah thats really helpful. So in that case, I can just put this block in my AppServiceProvider boot function to make sure they exist before I try to use them anywhere
foreach (TwillAppSettings::getAllGroups() as $group) {
$group->boot();
}
foreach (TwillAppSettings::getAllGroups() as $group) {
$group->boot();
}
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
For now my wrapper is working like a charm so I'm happy either way
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
Is there a simple way to use that seeder? I looked around but didn't find anything that stood out
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
I have gotten around this with a wrapper class but feels hacky to need to do this:
<?php

namespace App\Facades;

use A17\Twill\Facades\TwillAppSettings as FacadesTwillAppSettings;

class TwillAppSettings extends FacadesTwillAppSettings
{
public static function get($identifier, $default = null)
{
try {
return parent::get($identifier);
} catch (\Exception $e) {
return $default;
}
}
}
<?php

namespace App\Facades;

use A17\Twill\Facades\TwillAppSettings as FacadesTwillAppSettings;

class TwillAppSettings extends FacadesTwillAppSettings
{
public static function get($identifier, $default = null)
{
try {
return parent::get($identifier);
} catch (\Exception $e) {
return $default;
}
}
}
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
Hi @ifox just tagging since I haven't had a response. Maybe I should have put this in #❓questions like last time
18 replies
TCTwill CMS
Created by RacoonMittens on 6/14/2024 in #👊support
Seeding settings
For context the specific settings field I'm getting that gives me that error is a browser multi-select
18 replies