Overide admin system.php config - social login
-
Hi,
I am a fairly new bagisto user and would like to ask about best practice.
- I want to change some configuration (add more options in social login), but I want to stay fully compatible with new updates and I don't want to change the source files. Also, I don't know how to edit this single file without copying and overriding the whole Admin package.
File path that I want to edit:
packages/Webkul/Admin/src/Config/system.phpIs there any option to override only one file without creating a new (copied Admin) package, or is that the only correct way?
For views, it was quite simple; we only needed to copy the templates we wanted to edit and make the changes.
- If I want to add a new login provider, is the best way to override the existing SocialLogin package as well? How does the upgrade process look for such overridden packages? I understand that we do a merge of the package after the update and manually resolve all conflicts? I can't imagine another way for now.
-
Hello @marinDan
To override the system.php file kindly update this line of code in the boot method in the respective Service Provider file.
On the left side, enter the path with the file name system.php; on the right side, enter the path where you need to override the file.
$this->publishes([ dirname(DIR).'/Config/system.php' => dirname(DIR).'/../../path/ofYour/folder/filename_withextension', ]);
After this run the command
php artisan vendor:publish --force
Thanks & Regards
-