Blame view
app/Providers/AppServiceProvider.php
1.23 KB
2dde15d57 Утверждение переноса |
1 2 3 |
<?php namespace App\Providers; |
09a2fc9d8 messages and subs... |
4 5 6 7 |
use App\Models\Message; use App\Models\User; use App\Observers\MessageObserver; use App\Observers\UserObserver; |
4882dedc8 verfiy emails |
8 9 10 |
use Carbon\Carbon; use Illuminate\Auth\Notifications\VerifyEmail; use Illuminate\Notifications\Messages\MailMessage; |
2dde15d57 Утверждение переноса |
11 |
use Illuminate\Support\ServiceProvider; |
4882dedc8 verfiy emails |
12 |
use Illuminate\Support\Facades\URL; |
2dde15d57 Утверждение переноса |
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
class AppServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { // } /** * Bootstrap any application services. * * @return void */ public function boot() { |
4882dedc8 verfiy emails |
33 34 35 36 37 38 39 40 41 |
VerifyEmail::toMailUsing(function ($notifiable) { $verifyUrl = URL::temporarySignedRoute( 'verification.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey(), 'hash' => sha1($notifiable->getEmailForVerification()),] ); return (new MailMessage) ->subject('Подтвердите ваш адрес электронной почты!') ->view('emails.send_verify', ['url' => $verifyUrl]); }); |
09a2fc9d8 messages and subs... |
42 43 44 |
Message::observe(MessageObserver::class); User::observe(UserObserver::class); |
2dde15d57 Утверждение переноса |
45 |
} |
4882dedc8 verfiy emails |
46 |
|
2dde15d57 Утверждение переноса |
47 |
} |