0
내보기는 다음과 같이이다 :파일 csv는 어떻게 가져올 수 있습니까? Laravel 5.3
<div class="form-group col-sm-12">
{!! Form::label('import', 'Import File:') !!}
{!! Form::file('import_file', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-12">
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
<a href="{!! route('customers.index') !!}" class="btn btn-default">Cancel</a>
</div>
내 컨트롤러는 다음과 같이이다 :
if($request->hasFile('import_file')){
dd('test');
$path = $request->file('import_file')->getRealPath();
$data = Excel::load($path, function($reader) {})->get();
if(!empty($data) && $data->count()){
...
}
}
내가 파일 CSV를 업로드 할 수 있습니다. 그런 다음 저장합니다.
그러나 dd ('test')는 실행되지 않습니다. 반면 내가 그것을 업로드했습니다
내가 어떻게 해결할 수 있습니까?
는 전체 형태와 컨트롤러 방법에서 모든 코드를 게시 할 수 있습니까? 뭔가 다른 곳에서 그것을 막고 있을지도 모릅니다. – Jerodev