mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 16:00:54 -03:00
Added: language to User profile (DB)
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.
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
|
||||
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;
|
||||
use App\Events\ReturnItem;
|
||||
use App\Listeners\AlertReturnedItem;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -24,6 +25,10 @@ class EventServiceProvider extends ServiceProvider
|
||||
ReturnItem::class => [
|
||||
AlertReturnedItem::class,
|
||||
],
|
||||
|
||||
'Illuminate\Auth\Events\Login' => [
|
||||
SetLanguage::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user