Do do I set the default value of my custom setting?

You can add a default value to any setting by using the default method and passing your default value.


namespace Acme\MyModule;

use Aero\Common\Facades\Settings;
use Aero\Common\Providers\ModuleServiceProvider;
use Aero\Common\Settings\SettingGroup;

class ServiceProvider extends ModuleServiceProvider
   public function setup()
       Settings::group('acme-my-module', function (SettingGroup $group) {
           $group->string('denied_message')->default('Access Denied');

Articles in this section

Was this article helpful?
0 out of 0 found this helpful