Skip to content

Commit

Permalink
update form pendaftaran peserta, update error log
Browse files Browse the repository at this point in the history
  • Loading branch information
t0n1zz committed Apr 3, 2023
1 parent 3aba2c8 commit ec3a57d
Show file tree
Hide file tree
Showing 69 changed files with 9,878 additions and 5,854 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified app/.DS_Store
Binary file not shown.
24 changes: 4 additions & 20 deletions app/ErrorLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,17 @@ class ErrorLog extends BaseEloquent
{
use Dataviewer;

protected $table = 'error_log';

public static $rules = [
'content' => 'required'
];
protected $table = 'error_logs';

protected $fillable = [
'id_user','content','status'
'id','message','context','level','level_name','channel','datetime','extra'
];

protected $allowedFilters = [
'user.name','status','created_at','updated_at'
'message','context','level','datetime','created_at','updated_at'
];

protected $orderable = [
'user.name','status','created_at','updated_at'
'level','datetime','created_at','updated_at'
];

public static function initialize()
{
return [
'id_user' => '' ,'request' => '' ,'content' => '' ,
];
}

public function user()
{
return $this->belongsTo('App\User','id_user','id')->select('id','id_aktivis','id_cu','name');
}
}
Binary file modified app/Http/.DS_Store
Binary file not shown.
28 changes: 2 additions & 26 deletions app/Http/Controllers/ErrorLogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,17 @@ class ErrorLogController extends Controller{

public function index()
{
$table_data = ErrorLog::with('user.cu','user.aktivis')->advancedFilter();
$table_data = ErrorLog::advancedFilter();

return response()
->json([
'model' => $table_data
]);
}


public function create()
{
return response()
->json([
'form' => ErrorLog::initialize(),
'rules' => ErrorLog::$rules,
'option' => []
]);
}

public function store(Request $request)
{
$this->validate($request,ErrorLog::$rules);

$kelas = ErrorLog::create($request->all());

return response()
->json([
'saved' => true,
'message' => $this->message. ' berhasil ditambah'
]);
}

public function show($id)
{
$kelas = ErrorLog::with('user')->findOrFail($id);
$kelas = ErrorLog::findOrFail($id);

return response()
->json([
Expand Down
1,616 changes: 819 additions & 797 deletions app/Http/Controllers/JalinanKlaimController.php

Large diffs are not rendered by default.

Loading

0 comments on commit ec3a57d

Please sign in to comment.