• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

Cant find admin middleware's path called in many controllers.

General Discussion
2
4
401
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.
  • N
    nahiyan.aziz last edited by 16 Jun 2020, 05:02

    i see in may controller inside the package, inside the constructor an admin middleware was called. i am having a hard time finding the location of this admin middleware

    1 Reply Last reply Reply Quote 0
    • N
      Naresh-webkul last edited by 16 Jun 2020, 07:34

      Hello @nahiyan-aziz ,
      Can you please elaborate this, so that we can find a solution in a better way.
      Thank you .

      1 Reply Last reply Reply Quote 0
      • N
        nahiyan.aziz last edited by 16 Jun 2020, 08:31

        i had just installed bagisto... i was exploring it. i see in some controllers, for user role management, admin middleware was used. lets say in a package like Admin->src->Http->Sales->InvoiceController
        in Invoice controller admin middleware was called
        public function __construct( OrderRepository $orderRepository,
        InvoiceRepository $invoiceRepository
        )
        {

            $this->middleware('admin'); /// the path im searching for
        
            $this->_config = request('_config');
        
            $this->orderRepository = $orderRepository;
        
            $this->invoiceRepository = $invoiceRepository;
        }
        

        now here, i cant find the path of this admin middleware used in constructor

        1 Reply Last reply Reply Quote 0
        • N
          Naresh-webkul last edited by 16 Jun 2020, 17:15

          Hi @nahiyan-aziz ,
          You may check the following file :
          Goto packages/Webkul/User/src/Http/Middleware/Bouncer.php
          Thank you.

          1 Reply Last reply Reply Quote 0
          2 out of 4
          • First post
            2/4
            Last post