Warning: $message could conflict with a reserved variable name, what's the purpose of your "$message" variable?
if you need to pass data you better use with() method (https://laravel.com/api/5.4/Illuminate/Mail/Mailable.html#method_with)
Anyway make it public and it will be available in the scope of building message (https://laravel.com/docs/5.4/mail#view-data)
ie:
public $message;
but you still need to populate the variable... you can do it in the construct
ie:
public function __construct(Request $request, String $message) { $this->request = $request; $this->message = $message; }
replace your $massage variable by $msg and it will work.Pass this variable to your construct as a parametere and then define a public attribute like so public $msg
krishnaguragain liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community