Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sipeka
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
sipeka
Commits
685c324f
Commit
685c324f
authored
May 07, 2024
by
Siti Aisah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update kategori pengusul
parent
d3988bcd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
125 additions
and
12 deletions
+125
-12
app/Http/Controllers/TransaksiController.php
+55
-10
app/Models/Admin/Penelaah.php
+19
-0
app/Models/Admin/Pengajuan.php
+29
-0
config/database.php
+11
-0
config/filesystems.php
+8
-0
resources/views/layouts/menu.blade.php
+1
-1
resources/views/transaksi/index.blade.php
+0
-0
routes/web.php
+2
-1
No files found.
app/Http/Controllers/TransaksiController.php
View file @
685c324f
...
...
@@ -3,30 +3,75 @@
namespace
App\Http\Controllers
;
use
App\Http\Support\ValidationRule
;
use
Illuminate\Support\Facades\Hash
;
use
App\Http\Controllers\Controller
;
use
App\Models\Kegiatan
;
use
App\Models\KegiatanPeserta
;
use
App\Models\Konferensi
;
use
App\Models\Registrasi
;
use
App\Models\User
;
use
App\Models\VRegistrasi
;
use
App\Models\Admin\Pengajuan
;
use
Exception
;
use
Storage
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Redirect
;
class
TransaksiController
extends
Controller
{
public
function
index
()
{
$tr
=
DB
::
connection
(
'epk'
)
->
table
(
'v_penelaah'
)
->
get
();
$pengusul
=
DB
::
table
(
'bantuan_pengusul'
)
->
get
();
$kategori
=
DB
::
table
(
'ms_kategori'
)
->
orderBy
(
'kode_kategori'
,
'asc'
)
->
get
();
dd
(
$tr
);
$data
=
[
'semua'
=>
$tr
,
'pengusul'
=>
$pengusul
,
'kategori'
=>
$kategori
];
return
view
(
'transaksi.index'
,
$data
);
}
public
function
store
(
Request
$request
){
$rule
=
[
'kategori'
=>
'required'
,
'file_ec'
=>
'required'
,
'nosurat'
=>
'required'
];
$request
->
validate
(
$rule
,
ValidationRule
::
getErrorMessage
(
$rule
));
DB
::
beginTransaction
();
if
(
$request
->
hasFile
(
'file_ec'
)){
$file
=
$request
->
file
(
'file_ec'
);
$filename
=
$file
->
getClientOriginalName
();
Storage
::
disk
(
'uploads'
)
->
put
(
'sipeka/'
.
$filename
,
file_get_contents
(
$file
->
getRealPath
()));
}
try
{
$transaksi
=
[
'id_pengajuan'
=>
$request
->
idpengajuan
,
'judul'
=>
$request
->
judul
,
'pengusul'
=>
$request
->
pengusul
,
'klasifikasi'
=>
$request
->
klasifikasi
,
'tahun'
=>
$request
->
tahun
,
'id_kategori'
=>
$request
->
kategori
,
'file_ec'
=>
$filename
,
'no_sk'
=>
$request
->
nosurat
,
];
Pengajuan
::
query
()
->
create
(
$transaksi
);
DB
::
commit
();
return
Redirect
::
route
(
'transaksi.index'
)
->
with
(
'success'
,
'Data kategori berhasil diupdate'
);
}
catch
(
Exception
$e
){
Log
::
error
(
$e
);
DB
::
rollBack
();
return
Redirect
::
route
(
'transaksi.index'
)
->
with
(
'error'
,
'Data kategori gagal diupdate'
);
}
}
}
app/Models/Admin/Penelaah.php
0 → 100644
View file @
685c324f
<?php
namespace
App\Models\Admin
;
use
App\Traits\Uuid
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
class
Penelaah
extends
Model
{
use
HasFactory
;
use
Uuid
;
public
$incrementing
=
false
;
protected
$table
=
'tr_penelaah'
;
protected
$keyType
=
'string'
;
protected
$guarded
=
[];
}
app/Models/Admin/Pengajuan.php
0 → 100644
View file @
685c324f
<?php
namespace
App\Models\Admin
;
use
App\Traits\Uuid
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
class
Pengajuan
extends
Model
{
use
HasFactory
;
use
Uuid
;
public
$incrementing
=
false
;
protected
$table
=
'tr_pengajuan'
;
protected
$keyType
=
'string'
;
protected
$fillable
=
[
'id'
,
'id_pengajuan'
,
'judul'
,
'pengusul'
,
'klasifikasi'
,
'tahun'
,
'id_kategori'
,
'file_ec'
,
'no_sk'
];
}
config/database.php
View file @
685c324f
...
...
@@ -117,8 +117,19 @@
'prefix'
=>
''
,
'strict'
=>
false
,
'engine'
=>
null
,
'options'
=>
[
\PDO
::
MYSQL_ATTR_LOCAL_INFILE
=>
true
,
],
],
'ssh'
=>
[
'host'
=>
env
(
'SSH_HOST'
),
'port'
=>
env
(
'SSH_PORT'
),
'username'
=>
env
(
'SSH_USER'
),
'key'
=>
env
(
'SSH_KEY'
),
],
],
/*
...
...
config/filesystems.php
View file @
685c324f
...
...
@@ -56,6 +56,14 @@
'throw'
=>
false
,
],
'uploads'
=>
[
'driver'
=>
'ftp'
,
'host'
=>
'statik.unesa.ac.id'
,
'username'
=>
'anchuz'
,
'password'
=>
'k0nt3nstatik@un3s4ppt1!)@(#*'
,
'ssl'
=>
true
,
],
],
/*
...
...
resources/views/layouts/menu.blade.php
View file @
685c324f
...
...
@@ -11,7 +11,7 @@
</li>
<li
class=
"dropdown nav-item"
data-menu=
"dropdown"
><a
class=
"dropdown-toggle nav-link d-flex align-items-center"
href=
"#"
data-bs-toggle=
"dropdown"
><i
data-feather=
'edit'
></i><span
data-i18n=
"Apps"
>
Transaksi
</span></a>
<ul
class=
"dropdown-menu"
data-bs-popper=
"none"
>
<li
data-menu=
""
class=
"{{ (request()->
is('/transaksi')) ? 'active' : '' }}"
><a
href=
"{{ route('admin.index-transaksi
') }}"
class=
"dropdown-item d-flex align-items-center"
data-bs-toggle=
""
data-i18n=
"Email"
><i
data-feather=
"check-square"
></i><span
data-i18n=
"Email"
>
Update Kategori
</span></a>
<li
data-menu=
""
class=
"{{ (request()->
getRequestUri() == "
/
transaksi
")
?
'
active
'
:
''
}}"
><a
href=
"{{ route('transaksi.index
') }}"
class=
"dropdown-item d-flex align-items-center"
data-bs-toggle=
""
data-i18n=
"Email"
><i
data-feather=
"check-square"
></i><span
data-i18n=
"Email"
>
Update Kategori
</span></a>
</li>
<li
data-menu=
""
class=
"{{ (request()->is('pasien/antrian')) ? 'active' : '' }}"
><a
href=
"#"
class=
"dropdown-item d-flex align-items-center"
data-bs-toggle=
""
data-i18n=
"Todo"
><i
data-feather=
'log-in'
></i><span
data-i18n=
"Todo"
>
Tarik Data SAKU
</span></a>
</li>
...
...
resources/views/transaksi/index.blade.php
View file @
685c324f
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
685c324f
...
...
@@ -19,9 +19,10 @@
return
view
(
'dashboard'
);
});
Route
::
get
(
'/transaksi
'
,
[
TransaksiController
::
class
,
'index'
])
->
name
(
'admin.index-transaksi'
);
// Route::get('/home
', [TransaksiController::class, 'index'])->name('admin.index-transaksi');
// Admin
Route
::
resource
(
'kategori'
,
KategoriController
::
class
);
Route
::
resource
(
'transaksi'
,
TransaksiController
::
class
);
// End of Admin
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