Commit 98fa27bc by Rinto

history

parent 5577d57c
...@@ -278,6 +278,30 @@ class AdminController extends Controller ...@@ -278,6 +278,30 @@ class AdminController extends Controller
return view('admin.history.index',$this->data); return view('admin.history.index',$this->data);
} }
public function hapus_history($id){
$bata = DB::table('batal')->where('id' , $id)->first();
Batal::find($id)->delete();
return redirect(url('/admin/history'))->with('info','History berhasil dihapus');
}
public function history_detail($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['batal'] = Batal::find($id);
return view('admin.history.detail',$this->data);
}
public function hapus_history2($id){
$konfir = DB::table('konfirmasi')->where('id' , $id)->first();
Konfirmasi::find($id)->delete();
return redirect(url('/admin/history'))->with('info','History berhasil dihapus');
}
public function history_detail2($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['konfirmasi'] = Konfirmasi::find($id);
return view('admin.history.detail',$this->data);
}
public function pemesanan(){ public function pemesanan(){
$key = Input::get('search'); $key = Input::get('search');
$this->data['title'] = 'Pemesanan Bus IT Del'; $this->data['title'] = 'Pemesanan Bus IT Del';
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<th>Tujuan</th> <th>Tujuan</th>
<th>Berangkat</th> <th>Berangkat</th>
<th>Status</th> <th>Status</th>
<th>Aksi</th>
</tr></thead> </tr></thead>
<tbody> <tbody>
@foreach($batal as $bata) @foreach($batal as $bata)
...@@ -49,6 +50,10 @@ ...@@ -49,6 +50,10 @@
<td>{{$bata->tujuan}}</td> <td>{{$bata->tujuan}}</td>
<td>{{$bata->berangkat}}</td> <td>{{$bata->berangkat}}</td>
<td><span class="label label-danger">Dibatalkan</span> <td><span class="label label-danger">Dibatalkan</span>
<td colspan="3">
<a href="{{url('admin/history/detail',$bata->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('admin/history/hapus',$bata->id)}}" class="btn btn-danger">Hapus</a>
</td>
</tr> </tr>
</form> </form>
@endforeach @endforeach
...@@ -58,6 +63,10 @@ ...@@ -58,6 +63,10 @@
<td>{{$konfir->tujuan}}</td> <td>{{$konfir->tujuan}}</td>
<td>{{$konfir->berangkat}}</td> <td>{{$konfir->berangkat}}</td>
<td><span class="label label-info">{{$konfir->status}}</span> <td><span class="label label-info">{{$konfir->status}}</span>
<td colspan="3">
<a href="{{url('admin/history/detail2',$konfir->id)}}" class="btn btn-danger">Detail</a>
<a href="{{url('admin/history/hapus2',$konfir->id)}}" class="btn btn-danger">Hapus</a>
</td>
</tr> </tr>
</form> </form>
@endforeach @endforeach
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment