Well, according to the error message it is my Route. But I have defined my routes correctly:
Route::get('/import', 'DashboardController@getImport');
Route::post('/import', 'DashboardController@postImport');
If I just do this, it will work:
public function postImport(ImportRequest $request)
{
return 'Success!';
}
But when I try to acces "$request", I get the error:
public function postImport(ImportRequest $request)
{
$file = $this -> $request -> file('import_file'); # Error
return $file;
}
Okay, it was simple:
public function postImport(ImportRequest $request)
{
$file = $this -> $request -> file('import_file'); # BULLSHIT! -> ERROR!
$file = $request -> file('import_file'); # WORKS!
return $file;
}
I hate such simple mistakes ^^
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community