Bagisto Forum

    Bagisto

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

    Override Facade

    General Discussion
    2
    2
    550
    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.
    • D
      dulox2 last edited by

      How can I override /packages/Webkul/Checkout/src/Cart.php and /packages/Webkul/Product/src/Type/AbstractType.php in my own package?

      1 Reply Last reply Reply Quote 0
      • R
        rahul last edited by

        Hi @dulox2

        To override any facades, first of all, you need to create your own facades in your package extending with main facades (To whom you want to override).
        Now in your facades, you can create method & can write your own logic.
        You need to add the following line in your packages provider.

        $this->app->bind('core', 'Webkul\your\facades\path');
        

        and can /packages/Webkul/Product/src/Type/AbstractType.php this class to your package.

        Thanks

        1 Reply Last reply Reply Quote 0
        • First post
          Last post