Mahmoud Ebada
Mahmoud Ebada

Reputation: 1

Laravel Backpack 4.1.x server Call to a member function hasAccessOrFail() on null error

I'm using Laravel backpack 4.1.x with Laravel v7.21.0 locally all the CRUD operations working fine with the development team but after deploying on the server and using license code, then try to use any CRUD operations like listing or create error appearing even though the server and local has the same configuration

Call to a member function hasAccessOrFail() on null

create operation error list operation error do you have any idea about this problem?

Upvotes: 0

Views: 903

Answers (1)

zobay
zobay

Reputation: 106

I have also faced this problem. Because, I was using constructor in controller which extends the Laravel Backpack CrudController. But, I forgot to call the parent contorller.

class FaqCrudController extends CrudController
{
 public function __construct(EvaluatorInterface $evaluator)
    {
      parent::__construct();
        $this->evaluator = $evaluator;
    }
}

Now, it is working.

Upvotes: 3

Related Questions