I have following blade file as form.blade.php action="">
and My controller methods for saving is ```
private function saveUploads(Request $request, $fileUrl, $id,$task)
{
$file = new File;
$file->file_name = $request->file('file_name')->getClientOriginalName();
$file->file_url = $fileUrl;
$file->project_id = $id;
$file->task_id = $task;
$file->save();
}
and My route is this
Route::post('projects/{projects}/files', [
'uses' => 'FilesController@uploadAttachments',
'as' => 'projects.files',
'middleware' => ['auth']
]);
but I got this error code here
Undefined variable: task (View: C:\Users\Jone\Desktop\ddd\resources\views\files\form.blade.php)
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2zv5BVF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire