Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA21617D4TI04
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rinto
PA21617D4TI04
Commits
98fa27bc
Commit
98fa27bc
authored
May 21, 2017
by
Rinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
history
parent
5577d57c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
AdminController.php
app/Http/Controllers/AdminController.php
+24
-0
index.blade.php
resources/views/admin/history/index.blade.php
+9
-0
No files found.
app/Http/Controllers/AdminController.php
View file @
98fa27bc
...
...
@@ -278,6 +278,30 @@ class AdminController extends Controller
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
(){
$key
=
Input
::
get
(
'search'
);
$this
->
data
[
'title'
]
=
'Pemesanan Bus IT Del'
;
...
...
resources/views/admin/history/index.blade.php
View file @
98fa27bc
...
...
@@ -41,6 +41,7 @@
<th>Tujuan</th>
<th>Berangkat</th>
<th>Status</th>
<th>Aksi</th>
</tr></thead>
<tbody>
@foreach(
$batal
as
$bata
)
...
...
@@ -49,6 +50,10 @@
<td>
{
{$bata->tujuan}
}
</td>
<td>
{
{$bata->berangkat}
}
</td>
<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>
</form>
@endforeach
...
...
@@ -58,6 +63,10 @@
<td>
{
{$konfir->tujuan}
}
</td>
<td>
{
{$konfir->berangkat}
}
</td>
<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>
</form>
@endforeach
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment