Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5: No hint path defined for [Auth]

I'm loading view for mail

$this->mail->send('auth::emails.email_confirmation', ['url' => $confirmationEmailUrl], function ($m) use ($user,  $toMail) {
            $m->to($toMail, $user->name)->subject('mail');
        });

And Service Provider

 public function registerViews()
    {
        $viewPath = base_path('resources/views/modules/auth');

        $sourcePath = __DIR__ . '/../Resources/views';

        $this->publishes([
            $sourcePath => $viewPath
        ]);

        $this->loadViewsFrom([$viewPath, $sourcePath], 'auth');
    } 

Note: I'm using pingpong module structure.

Any idea. I'm getting

No hint path defined for [Auth]

error message. what's problem with this?

like image 269
vijaykumar Avatar asked Dec 05 '25 03:12

vijaykumar


1 Answers

Try giving your service another key instead of "auth". Laravel uses that key and you might be running into conflicts.

public function registerViews()
{
    $viewPath = base_path('resources/views/modules/auth');

    $sourcePath = __DIR__ . '/../Resources/views';

    $this->publishes([
        $sourcePath => $viewPath
    ]);

    $this->loadViewsFrom([$viewPath, $sourcePath], 'my-auth');
} 

Then try

$this->mail->send('my-auth::emails.email_confirmation', ['url' => $confirmationEmailUrl], function ($m) use ($user,  $toMail) {
    $m->to($toMail, $user->name)->subject('mail');
});
like image 153
Patrick Stephan Avatar answered Dec 07 '25 18:12

Patrick Stephan