2 years ago

Custom package config value not accessible in laravel app

Posted 2 years ago by saqueib

I am having some issue my package which I am developing using orchestral/testbench.

Its laravel 5.5 package, I am not able to access the package's config value but same is working when I run packages phpunit test.

here is how I am accessing it in my package controllers


It passes the test but when I use this package in a laravel app above for testing as a path repository above is returning null.

Now if I change this to config('mypackage.allowed_access') I am able to access it in my laravel app but now my tests are failing since its not accecible in package now :(


public function boot()
    // Publish config 
        __DIR__.'/Config/mypackage.php' => config_path('mypackage.php'),
    ], 'mypackage_config');

public function register()
        __DIR__.'/Config/mypackage.php', 'mypackage'

Please help whats I am doing wrong

Please sign in or create an account to participate in this conversation.