MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/liftcincy.imenso.co/app/Providers/AuthServiceProvider.php
<?php

namespace App\Providers;

use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
use Laravel\Passport\Passport;
use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Notifications\Messages\MailMessage;
use Auth;
use App\User;
//use MailTemplate;
class AuthServiceProvider extends ServiceProvider
{
    /**
     * The policy mappings for the application.
     *
     * @var array
     */
    protected $policies = [
        'App\Model' => 'App\Policies\ModelPolicy',
    ];

    /**
     * Register any authentication / authorization services.
     *
     * @return void
     */
    public function boot()
    {
        $this->registerPolicies();

        if (!app()->runningInConsole()) {
            Passport::routes();
        };

        VerifyEmail::toMailUsing(function ($notifiable, $url) {
            $user = Auth::user($notifiable->id);
            $role = $user->roles->pluck('title','id')->toArray();

            //MailTemplate::to($user->email);
            //MailTemplate::attribute('url', $url);

            if(in_array('Volunteer',$role)){
                //MailTemplate::send(1); 
                return (new MailMessage)
                    ->subject('Concerted — Verify Your Email')
                    ->greeting("You're Almost Done!")
                    ->line("Soon you'll be able to sign up for volunteer opportunities, connect with your community, and attend your favorite events! All we need now is to verify your email.")
                    ->action('Verify Email', $url)
                    ->salutation('');
            }else if(in_array('Partner',$role)){
                //MailTemplate::send(9); 
                return (new MailMessage)
                    ->subject('Concerted — Verify Your Email')
                    ->greeting("You're Almost Done!")
                    ->line("We are so grateful you're with us! Soon you'll be able to post volunteer opportunities, keep track of your sign-ups, and continue to do the amazing work you do every day. All we need now is for you to verify your email address.")
                    ->action('Verify Email', $url)
                    ->salutation('');
            }
        });
    }
}