Category : laravel-config

I would like to know if there is a way to check if a config item exists. I have a case where I refer to some config items in the config/custom.php file, and others in a database table. The concept is to make use of existing config items that exist in config/custom.php, and when they ..

Read more

I need to make my routes conditional, based on config: if (config(‘auth.allow_registration’)) {…. The above config param is set in the config file: //config/auth.php ‘allow_registration’ => false, It is all working fine, until I try to unit-test it public function test_registration_screen_can_be_rendered() { config()->set(‘auth.allow_registration’, true); $response = $this->get(‘/register’); $response->assertStatus(200); } The test case is failing. I ..

Read more