mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-24 04:14:57 +00:00
Bruno Fontes
954820f46b
The language were set only on session. But now it is stored with user profile, on DB. It is important as now I can send alert e-mails to each user on their own languages and not the activer user language. Also, wherever the user logs out and logs in again, it will see the same site locale.
46 lines
974 B
PHP
46 lines
974 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\ReturnItem;
|
|
use App\Listeners\SetLanguage;
|
|
use App\Listeners\AlertReturnedItem;
|
|
use Illuminate\Support\Facades\Event;
|
|
use Illuminate\Auth\Events\Registered;
|
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The event listener mappings for the application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $listen = [
|
|
Registered::class => [
|
|
SendEmailVerificationNotification::class,
|
|
],
|
|
|
|
ReturnItem::class => [
|
|
AlertReturnedItem::class,
|
|
],
|
|
|
|
'Illuminate\Auth\Events\Login' => [
|
|
SetLanguage::class,
|
|
],
|
|
];
|
|
|
|
/**
|
|
* Register any events for your application.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
parent::boot();
|
|
|
|
//
|
|
}
|
|
}
|