Level 122
check you are doing the upload correctly
do you have this in your form tag enctype="multipart/form-data"
1 like
I am trying to send some files via mail:
Mail::send('vendor.notifications.email', $maildata, function($message) use ($input)
{
$message->to(Config::get('constants.bywood_mail'));
$message->subject(Lang::get('platform.message_new_user_subj'));
$message->from(Config::get('constants.bywood_mail'));
if(Input::file('files')){
foreach(Input::file('files') as $file) {
$message->attach( $file->getRealPath(), array(
'as' => $file->getClientOriginalName(),
'mime' => $file->getMimeType())
);
}
}
But although
var_dump($input);
shows that there are file pathes available:
'files' =>
array (size=3)
0 => string 'layer-slider-rtl.js' (length=19)
1 => string 'master-slider-fw.js' (length=19)
2 => string 'mouse-wheel.js' (length=14)
the following just gives me null values:
var_dump(Input::file('files'));
var_dump($request->file('files'));
I am trying to solve this problem for days already and appreciate any help. Please note that I am trying to do this in the RegisterController class where I am overriding the register method.
check you are doing the upload correctly
do you have this in your form tag enctype="multipart/form-data"
Please or to participate in this conversation.