Open elysiopires opened 8 years ago
Hi,
Please check if you have added the following in config/app.php and then try to execute php artisan vendor:publish :-
PushNotification service provider 'providers' => array( 'Davibennun\LaravelPushNotification\LaravelPushNotificationServiceProvider' )
AND
PushNotification facade
'aliases' => array( ... 'PushNotification' => 'Davibennun\LaravelPushNotification\Facades\PushNotification' )
Thanks, Abhijeet Naik Founder, www.pattypets.com
Hello I added the lines:
providers' => Davibennun\LaravelPushNotification\LaravelPushNotificationServiceProvider::class,
AND
PushNotification facade
'aliases' => 'PushNotification' => 'Davibennun\LaravelPushNotification\Facades\PushNotification::class
Hello I added the lines:
providers' => [Davibennun\LaravelPushNotification\LaravelPushNotificationServiceProvider::class,]
AND
PushNotification facade
'aliases' => ['PushNotification' => Davibennun\LaravelPushNotification\Facades\PushNotification::class]
But still not working...
Hi, please do a composer update in your command line, and see if there are any errors, if yes please share a screen shot of app.php where you added these lines and composer.json file.
Thanks, if you want we can get on Skype, i would love to help :)
Hi,
Here is my app.php: 'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Routing\ControllerServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Illuminate\Html\HtmlServiceProvider::class,
Davibennun\LaravelPushNotification\LaravelPushNotificationServiceProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Input' => Illuminate\Support\Facades\Input::class,
'Inspiring' => Illuminate\Foundation\Inspiring::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Form' => Illuminate\Html\FormFacade::class,
'Html' => Illuminate\Html\HtmlFacade::class,
'PushNotification' => Davibennun\LaravelPushNotification\Facades\PushNotification::class,
],
Here is my composer.json: { "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=5.5.9", "laravel/framework": "5.1.", "jacopo/laravel-authentication-acl": "1.3.", "laravelcollective/html": "5.1.", "illuminate/html": "^5.0", "league/flysystem-aws-s3-v3": "^1.0", "davibennun/laravel-push-notification": "dev-laravel5" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.", "phpunit/phpunit": "~4.0", "phpspec/phpspec": "~2.1" },
My Skype is elysio.pires14
I like to talk to solve this problem.
Thank you, Elysio
I am having the same issue...
solved it by adding
use PushNotification;
Which file i can add use PushNotification;
Just add use PushNotification
because it's already registered in aliases.
Laravel 5.3 has just been released, but has also withdrawn my sleep. PushNotifications has been my obstacle after running 'composer update' to update all dependencies. The alias and provider are set in 'config/app.php'. In which file could I place the use PushNotification
?
@webpriest Does Laravel 5.3 changes something on how service providers are loaded?
I suppose, because I get this error each time
[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Illuminate\Notifications\NotificationServiceProvider' not found
Last I checked, I found that LaravelPushNotification is required, so I used composer to require it, but still didn't work.
But @feber mentioned that he solve it by adding use PushNotification
, so I'm wondering where to put that. Thanks davidbennun
Have you added the correct paths to providers and alias array? Once that is one you can you the facade normally
Hello I am Anil, I am getting the same issue "davibennun/laravel-push-notification class not found". Can anybody help me
which file edit, where i put use PushNotification;
@webpriest @anilkumar201241 @ajaykucse11 my apologize for the slow response. I put
use PushNotification;
in controller which responsible to send the messages.
@feber not fixed error
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Illuminate\Notifications\NotificationServiceProvider' not found
[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Illuminate\Notifications\NotificationServiceProvider' not found how to fixed it anyone plz help me i did everything given here but i don't fixed it.
@ajaykucse11 Did you find a solution? Stuck with that problem too
Have the same problem here... Want to upgrade from V.3 to V.4
This is what I get:
<MyDevice>:/var/snipeit# php artisan migrate
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Illuminate\Notifications\NotificationServiceProvider' not found
PLEASE HELP...
This is because the upgraded version has no notification package included in framework.
So there are two ways you can fix this:
Illuminate\Notifications\NotificationServiceProvider::class,
line in your providers array in config/app.php
filevendor/laravel/framework/src/
is the location where Notification folder exist.
Hello,
I'm trying to install on laravel 5.1 and 5.2 but when I execute php artisan vendor:publish I got error class not defined.
Could you help me?
Thx in advance.