Am trying to import excel file. From current state I can upload the file, But I want insert excel file on each different table depending on the values in the combo box. ie if Value is A insert into tableA,Value is B insert into tableB like that. Am looking for, is it possible to check the values in the route and call model function.
Blade file
<form id="ExcelImportForm" method="post" enctype="multipart/form-data" action="">
<table class="table">
<tr>
<td>Select Project *</td>
<td>
<select required class="form-control" name="ExcelProject" id="ExcelProject">
<option selected disabled>Select Technology</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
</td>
</tr>
<tr>
<td>Select File *</td>
<td><input class="form-control" type="file" id="file" name="file" required ></td>
</tr>
<tr>
<td></td>
<td><button type="submit" id="ExcelMasterBtn" class="btn btn-success pull-right"><i class="fa fa-upload"></i> Upload</button></td>
</tr>
</table>
</form>
Below give is route which is working in single case, is it possible to implement an if statement inside that.
route.php
Route::get('/upload-panel/', function () {
(new \App\Http\Model\Excelentry())->importToDb();
return view('admin.upload-panel.excel-upload-panel');
});
Or anyother way to get this combobox value inside the model function
via Chebli Mohamed
As stated by Stanford Medical, It's indeed the one and ONLY reason women in this country get to live 10 years more and weigh 19 kilos lighter than we do.
RépondreSupprimer(Just so you know, it has absoloutely NOTHING to do with genetics or some hard exercise and EVERYTHING to around "how" they eat.)
BTW, What I said is "HOW", not "what"...
TAP this link to reveal if this easy questionnaire can help you find out your true weight loss potential