Add fare import/exporter #194

This commit is contained in:
Nabeel Shahzad
2018-03-22 17:48:57 -05:00
parent a44204b185
commit 46d8fb125a
17 changed files with 322 additions and 58 deletions

View File

@@ -245,7 +245,6 @@ class SubfleetController 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)
@@ -259,11 +258,11 @@ class SubfleetController extends Controller
ImportRequest::validate($request);
$path = Storage::putFileAs(
'import', $request->file('csv_file'), 'subfleets'
'import', $request->file('csv_file'), 'import_subfleets.csv'
);
$path = storage_path('app/'.$path);
Log::info('Uploaded flights import file to '.$path);
Log::info('Uploaded subfleets import file to '.$path);
$logs = $this->importSvc->importSubfleets($path);
}