• 7

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Laravel service provider is not found

When I access laravel, it said

Symfony \ Component \ Debug \ Exception \ FatalErrorException
'Krucas\Notification\NotificationServiceProvider' Not found

The Website locations is http://somedomain.com/index.php It's document physical path is :


And I have these setting in


providers array 'Krucas\Notification\NotificationServiceProvider'

Alias Array 'Notification'=> 'Krucas\Notification\Facades\Notification'

How can I know the Laravel maps the provider array and alias array to the physical path?

There were some cases with registration problem, cache issues, etc. Try one of these solutions:

  • register your provider (in main composer.json, then in config/app.php [provider & alias] ), then run composer dump-autoload
  • make sure you have initiated your package : go to the folder, then composer init
  • try php artisan config:cache or delete everything in bootstrap/cache/
  • 14
Reply Report

After adding the dependency in composer.json, you have to install the package before adding the class in service provider, using the below command:

composer update

You can easily check if the physical file(NotificationServiceProvider) exists in your project. If it does not exists, you need to install the package using above command(don't forget to comment out the service provider declaration in app.php and re-enable after installing the package.)

  • 1
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions