Add fare import/exporter #194
This commit is contained in:
@@ -198,7 +198,6 @@ class AirportController extends Controller
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @throws \League\Csv\Exception
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function import(Request $request)
|
||||
@@ -210,13 +209,12 @@ class AirportController extends Controller
|
||||
|
||||
if ($request->isMethod('post')) {
|
||||
ImportRequest::validate($request);
|
||||
|
||||
$path = Storage::putFileAs(
|
||||
'import', $request->file('csv_file'), 'airports'
|
||||
'import', $request->file('csv_file'), 'import_airports.csv'
|
||||
);
|
||||
|
||||
$path = storage_path('app/'.$path);
|
||||
Log::info('Uploaded airports import file to '.$path);
|
||||
Log::info('Uploaded airport import file to '.$path);
|
||||
$logs = $this->importSvc->importAirports($path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user