Bagisto Forum

    Bagisto

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

    how can override the handler (packages\Webkul\Core\src\Exceptions)

    Knowledge Base
    3
    10
    1235
    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.
    • Z
      zainawan99 last edited by

      how can override the handler (packages\Webkul\Core\src\Exceptions)

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @zainawan99,

        Just create one of your class and extend with this core handler class,

        <?php
        
        use Webkul\Core\Exceptions\Handler;
        
        class YourExceptionHandler extends Handler
        {}
        

        Now go to this file packages/Webkul/Core/src/Providers/CoreServiceProvider.php and just change the class name in bind method,

        ...
        $this->app->bind(
            ExceptionHandler::class,
            YourExceptionHandler::class
        );
        ...
        
        Z 1 Reply Last reply Reply Quote 0
        • Z
          zainawan99 @devansh-webkul last edited by

          @devansh-webkul if possible they have override app/Exceptions/Handler file src?

          1 Reply Last reply Reply Quote 0
          • devansh-webkul
            devansh-webkul last edited by

            Hi @zainawan99,

            Try the above code that will definitely help you.

            Z 1 Reply Last reply Reply Quote 0
            • Z
              zainawan99 @devansh-webkul last edited by

              @devansh-webkul
              how can override the 404 page layout?
              404-Page-not-found.png

              1 Reply Last reply Reply Quote 0
              • devansh-webkul
                devansh-webkul last edited by

                Hi @zainawan99,

                That varies from package to package for Admin package 404 is different and for Shop package 404 is different.

                So if you want to override you need to override the package view.

                Z 1 Reply Last reply Reply Quote 0
                • Z
                  zainawan99 @devansh-webkul last edited by

                  @devansh-webkul kindly send the exact path how can override this file?

                  1 Reply Last reply Reply Quote 0
                  • devansh-webkul
                    devansh-webkul last edited by

                    Hi @zainawan99,

                    Which one do you want to override?

                    Z 1 Reply Last reply Reply Quote 0
                    • Z
                      zainawan99 @devansh-webkul last edited by

                      @devansh-webkul i m override the file same as current custom theme 404 page

                      1 Reply Last reply Reply Quote 0
                      • ghermans
                        ghermans last edited by

                        You can use the blade file tracer to see what file you need to change https://devdocs.bagisto.com/1.x/themes/tracer.html

                        Kind regards,
                        Glenn Hermans

                        Manager Bagisto Europe
                        info@bagisto.eu

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