Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rafael Kurniawan
PBL_Promosi
Commits
7d6169c2
Commit
7d6169c2
authored
1 year ago
by
Shafwan Eksa Jayadi
Browse files
Options
Download
Email Patches
Plain Diff
Main Project
parent
0492fb43
main
No related merge requests found
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
app/Http/Controllers/Admin.php
+1
-1
app/Http/Controllers/Admin.php
app/Http/Controllers/Home.php
+8
-0
app/Http/Controllers/Home.php
app/Providers/AppServiceProvider.php
+5
-0
app/Providers/AppServiceProvider.php
laravel (1).sql
+116
-75
laravel (1).sql
resources/views/Home/daftarPemesanan.blade.php
+2
-2
resources/views/Home/daftarPemesanan.blade.php
resources/views/Home/detailDesa.blade.php
+2
-2
resources/views/Home/detailDesa.blade.php
resources/views/Home/detailDestinasi.blade.php
+4
-4
resources/views/Home/detailDestinasi.blade.php
resources/views/Home/index.blade.php
+1
-1
resources/views/Home/index.blade.php
with
139 additions
and
85 deletions
+139
-85
app/Http/Controllers/Admin.php
View file @
7d6169c2
...
...
@@ -313,7 +313,7 @@ public function prosesTambahAdmin(Request $request)
'phone'
=>
$request
->
phone
,
'role_id'
=>
$request
->
role_id
,
'edit_admin_desa'
=>
'0'
,
'approve_wisata'
=>
'
1
'
,
'approve_wisata'
=>
'
0
'
,
'tambah_edit_admin_destinasi'
=>
'1'
,
'mengajukan_destinasi'
=>
'1'
,
'konfirmasi_tiket'
=>
'0'
,
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Home.php
View file @
7d6169c2
...
...
@@ -218,6 +218,10 @@ public function prosesPesanDestinasi(Request $request, $id_destinasi, $id_user)
$destinasi
=
Destinasi
::
where
(
'id'
,
$id_destinasi
)
->
first
();
$total
=
$request
->
jumlah
*
$destinasi
[
'htm_destinasi'
];
$this
->
validate
(
$request
,
[
'tanggal'
=>
'required|after:yesterday'
]);
$tiket
=
Tiket
::
create
([
'nama_pemesan'
=>
$user
[
'name'
],
'jumlah_tiket'
=>
$request
->
jumlah
,
...
...
@@ -264,6 +268,10 @@ public function prosesPesanPaket(Request $request, $id_paket, $id_user)
$paket
=
Paket
::
where
(
'id'
,
$id_paket
)
->
first
();
$total
=
$request
->
jumlah
*
$paket
[
'harga_paket'
];
$this
->
validate
(
$request
,
[
'tanggal'
=>
'required|after:yesterday'
]);
$tiket
=
Tiket
::
create
([
'nama_pemesan'
=>
$user
[
'name'
],
'jumlah_tiket'
=>
$request
->
jumlah
,
...
...
This diff is collapsed.
Click to expand it.
app/Providers/AppServiceProvider.php
View file @
7d6169c2
...
...
@@ -4,6 +4,7 @@
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Pagination\Paginator
;
use
Illuminate\Support\Facades\Blade
;
class
AppServiceProvider
extends
ServiceProvider
{
...
...
@@ -25,5 +26,9 @@ public function register()
public
function
boot
()
{
Paginator
::
useBootstrap
();
Blade
::
directive
(
'currency'
,
function
(
$expression
)
{
return
"Rp. <?php echo number_format(
$expression
,0,',','.'); ?>"
;
});
}
}
This diff is collapsed.
Click to expand it.
laravel.sql
→
laravel
(1)
.sql
View file @
7d6169c2
This diff is collapsed.
Click to expand it.
resources/views/Home/daftarPemesanan.blade.php
View file @
7d6169c2
...
...
@@ -141,13 +141,13 @@
@if ($ticket['paket_id'] != null)
@foreach ($paket as $item)
@if ($ticket->paket_id == $item->id)
<td>
{{
$item->harga_paket * $ticket->jumlah_tiket
}}
</td>
<td>
@currency(
$item->harga_paket * $ticket->jumlah_tiket
)
</td>
@endif
@endforeach
@else
@foreach ($destinasi as $item)
@if ($ticket->destinasi_id == $item->id)
<td>
{{
$item->htm_destinasi * $ticket->jumlah_tiket
}}
</td>
<td>
@currency(
$item->htm_destinasi * $ticket->jumlah_tiket
)
</td>
@endif
@endforeach
@endif
...
...
This diff is collapsed.
Click to expand it.
resources/views/Home/detailDesa.blade.php
View file @
7d6169c2
...
...
@@ -203,9 +203,9 @@ class="d-block w-100">
<div
class=
"deskripsiPaketDesti"
>
<h3>
{{ str_replace('|', ' + ', $pak['destinasi']) }}
</h3>
<p
style=
"text-decoration: line-through white;"
>
Rp{{
$pak['harga_normal']
}}
<p
style=
"text-decoration: line-through white;"
>
@currency(
$pak['harga_normal']
)
</p>
<p
style=
"font-size: 25px;"
>
Rp{{
$pak['harga_paket']
}}
</p>
<p
style=
"font-size: 25px;"
>
@currency(
$pak['harga_paket']
)
</p>
<span>
Limited
</span>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/Home/detailDestinasi.blade.php
View file @
7d6169c2
...
...
@@ -158,7 +158,7 @@
@endforeach
<h3>
HTM
</h3>
<p
style=
"font-size: 20px;"
>
Rp {{
$destinasi['htm_destinasi']
}}
</p>
<p
style=
"font-size: 20px;"
>
@currency(
$destinasi['htm_destinasi']
)
</p>
<a
href=
"{{ url('pesan/destinasi', $destinasi['id']) }}"
class=
"btn_5 btn-info"
>
Pesan
Tiket
</a>
...
...
@@ -205,7 +205,7 @@ class="d-block w-100">
@if ($w->htm_wahana == 0)
<p>
Gratis
</p>
@else
<p>
Rp {!!
$w->htm_wahana
!!}
</p>
<p>
@currency(
$w->htm_wahana
)
</p>
@endif
</div>
</div>
...
...
@@ -240,9 +240,9 @@ class="d-block w-100">
</div>
<div
class=
"deskripsiPaketDesti"
>
<h3>
{{ str_replace('|', ' + ', $pak['wahana']) }}
</h3>
<p
style=
"text-decoration: line-through white;"
>
Rp{{
$pak['harga_normal']
}}
<p
style=
"text-decoration: line-through white;"
>
@currency(
$pak['harga_normal']
)
</p>
<p
style=
"font-size: 25px;"
>
Rp{{
$pak['harga_paket']
}}
</p>
<p
style=
"font-size: 25px;"
>
@currency(
$pak['harga_paket']
)
</p>
<span>
Limited
</span>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/Home/index.blade.php
View file @
7d6169c2
...
...
@@ -333,7 +333,7 @@
style=
"margin-right: 5px;"
></i>
{{ $reg->nama_kabupaten }}
</p>
@endif
@endforeach
<p
class=
"post-date"
>
Rp {{
$dest['htm_destinasi']
}}
</p>
<p
class=
"post-date"
>
@currency(
$dest['htm_destinasi']
)
</p>
</div>
</div>
</article>
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help