This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

nick-chel3444
nick-chel3444

Hello! I have some trouble with making my plugin. In my component class i cant use Mail::send because class Mail not found. But from layout or page it works fine. Im new to Laravel and october cms, and need some advise about the best way to use Mail laravel class from custom components, Thanks for your time)

that0n3guy
that0n3guy

I think you need a use Illuminate\Mail\Mailer as Mail ( I got that from: http://laravel.com/docs/4.2/facades )

Just a guess... I've not tested it.

alxy
alxy

You can also use octobers Mail in a component. You just need to remember that components (and plugins in general) are namespaced, so you need to add

use Mail;

on top of your File.

that0n3guy
that0n3guy

Listen to alxy :).

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.