Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
konaspi2024
Overview
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
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
konaspi2024
Commits
3e0d0d9d
Commit
3e0d0d9d
authored
Apr 01, 2024
by
Muhammad Iskandar Java
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.unesa.ac.id/aisah/konaspi2024
parents
457bdc73
087b1a4e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
app/Http/Controllers/Admin/AdminController.php
+9
-5
app/Models/Konferensi.php
+2
-1
resources/views/admin/konferensi/index.blade.php
+20
-4
No files found.
app/Http/Controllers/Admin/AdminController.php
View file @
3e0d0d9d
...
...
@@ -139,7 +139,7 @@ public function store_kegiatan(Request $request) {
try
{
$data
=
[
'nama'
=>
$request
->
nama
,
'nama'
=>
strip_tags
(
$request
->
nama
)
,
'harga'
=>
$request
->
harga
];
Kegiatan
::
query
()
->
create
(
$data
);
...
...
@@ -217,7 +217,8 @@ public function index_konferensi() {
public
function
store_konferensi
(
Request
$request
)
{
$rules
=
[
'nama'
=>
'required|string'
'nama'
=>
'required|string'
,
'harga'
=>
'required|numeric'
];
$request
->
validate
(
$rules
,
ValidationRule
::
getErrorMessage
(
$rules
));
...
...
@@ -226,7 +227,8 @@ public function store_konferensi(Request $request) {
try
{
$data
=
[
'nama'
=>
strip_tags
(
$request
->
nama
)
'nama'
=>
strip_tags
(
$request
->
nama
),
'harga'
=>
$request
->
harga
];
Konferensi
::
query
()
->
create
(
$data
);
DB
::
commit
();
...
...
@@ -245,7 +247,8 @@ public function store_konferensi(Request $request) {
public
function
update_konferensi
(
$id
,
Request
$request
)
{
$rules
=
[
'nama'
=>
'required|string'
'nama'
=>
'required|string'
,
'harga'
=>
'required|numeric'
];
$request
->
validate
(
$rules
,
ValidationRule
::
getErrorMessage
(
$rules
));
...
...
@@ -254,7 +257,8 @@ public function update_konferensi($id, Request $request) {
try
{
$data
=
[
'nama'
=>
$request
->
nama
'nama'
=>
$request
->
nama
,
'harga'
=>
$request
->
harga
];
Konferensi
::
query
()
->
where
(
'id'
,
$id
)
->
update
(
$data
);
...
...
app/Models/Konferensi.php
View file @
3e0d0d9d
...
...
@@ -17,7 +17,8 @@ class Konferensi extends Model
protected
$fillable
=
[
'id'
,
'nama'
'nama'
,
'harga'
];
public
function
rKonferensi
()
{
...
...
resources/views/admin/konferensi/index.blade.php
View file @
3e0d0d9d
...
...
@@ -26,6 +26,7 @@
<tr style="
text
-
align
:
center
;
">
<th>No.</th>
<th>Konferensi</th>
<th>Harga</th>
<th>Aksi</th>
</tr>
</thead>
...
...
@@ -37,6 +38,7 @@
<tr style="
text
-
align
:
center
;
">
<td>{{
$no
}}</td>
<td>{{
$tr->nama
}}</td>
<td>{{
$tr->harga
}}</td>
<td>
<button type="
button
" class="
btn
btn
-
info
" data-toggle="
modal
" data-target="
#update-modal{{$tr->id}}">Ubah</button>
<
button
type
=
"button"
class
="
btn
btn
-
danger
" data-toggle="
modal
" data-target="
#delete-modal{{$tr->id}}">Hapus</button>
...
...
@@ -51,14 +53,21 @@
<form method="
POST
" action="
{{
route
(
'admin.create_konferensi'
,
[
'id'
=>
$tr
->
id
])
}}
" enctype="
multipart
/
form
-
data
">
@csrf
<div class="
modal
-
body
"
@if (
$errors->has
('nama')) has-error @endif
>
<div class="
modal
-
body
">
<div class="
form
-
group
" style="
text
-
align
:
left
">
<label for="
nama
">Nama Konferensi</label>
<input type="
text
" class="
form
-
control
" id="
nama
" name="
nama
" required>
<input type="
text
" class="
form
-
control
" id="
nama
" name="
nama
" required
@if(
$errors->has
('nama')) has-error @endif
>
@if (
$errors->has
('nama'))
<label id="
login
-
error
" class="
error
" for="
nama
" style="
color
:
red
">
{
{$errors->first('nama')}
}
</label>
@endif
</div>
<div class="
form
-
group
" style="
text
-
align
:
left
">
<label for="
harga
">Harga</label>
<input type="
number
" class="
form
-
control
" id="
harga
" name="
harga
" required @if(
$errors->has
('harga')) has-error @endif>
@if(
$errors->has
('harga'))
<label id="
login
-
error
" class="
error
" for="
harga
" style="
color
:
red
">
{
{$errors->first('harga')}
}
</label>
@endif
</div>
</div>
<div class="
modal
-
footer
">
<button type="
submit
" class="
btn
btn
-
primary
ml
-
1
">Simpan</button>
...
...
@@ -81,14 +90,21 @@
<form method="
POST
" action="
{{
route
(
'admin.update_konferensi'
,
[
'id'
=>
$tr
->
id
])
}}
" enctype="
multipart
/
form
-
data
">
@csrf
@method('put')
<div class="
modal
-
body
"
@if (
$errors->has
('nama')) has-error @endif
>
<div class="
modal
-
body
">
<div class="
form
-
group
" style="
text
-
align
:
left
">
<label for="
nama
">Nama Konferensi</label>
<input type="
text
" class="
form
-
control
" id="
nama
" name="
nama
" value="
{{
$tr
->
nama
}}
" required>
<input type="
text
" class="
form
-
control
" id="
nama
" name="
nama
" value="
{{
$tr
->
nama
}}
" required
@if(
$errors->has
('nama')) has-error @endif
>
@if (
$errors->has
('nama'))
<label id="
login
-
error
" class="
error
" for="
nama
" style="
color
:
red
">
{
{$errors->first('nama')}
}
</label>
@endif
</div>
<div class="
form
-
group
" style="
text
-
align
:
left
">
<label for="
harga
">Harga</label>
<input type="
text
" class="
form
-
control
" id="
harga
" name="
harga
" value="
{{
$tr
->
harga
}}
" required @if(
$errors->has
('harga')) has-error @endif>
@if(
$errors->has
('harga'))
<label id="
login
-
error
" class="
error
" for="
harga
" style="
color
:
red
">
{
{$errors->first('harga')}
}
</label>
@endif
</div>
</div>
<div class="
modal
-
footer
">
<button type="
submit
" class="
btn
btn
-
primary
ml
-
1
">Simpan</button>
...
...
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