Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Overide admin system.php config - social login

    General Discussion
    2
    2
    90
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      marinDan last edited by

      Hi,

      I am a fairly new bagisto user and would like to ask about best practice.

      1. 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.php

      Is 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.
      376c5208-acea-446a-9afe-0d64bbfe4367-image.png

      1. 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.
      1 Reply Last reply Reply Quote 0
      • Rishabh-Webkul
        Rishabh-Webkul last edited by

        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

        1 Reply Last reply Reply Quote 0
        • Referenced by  Rishabh-Webkul Rishabh-Webkul 
        • First post
          Last post