Browse Source

Merge pull request 'default page' (#210) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#210
pull/3/head
farhantock 1 year ago
parent
commit
080fd2c4b4
  1. 3
      app/Http/Controllers/RoleController.php
  2. 2
      app/Models/Role.php

3
app/Http/Controllers/RoleController.php

@ -18,6 +18,9 @@ class RoleController extends Controller
$data = $request->all(); $data = $request->all();
$data['created_by'] = $this->currentName; $data['created_by'] = $this->currentName;
if (!isset($data['default_page'])) {
$data['default_page'] = 29; // dashboard
}
$result = Role::create($data); $result = Role::create($data);

2
app/Models/Role.php

@ -12,6 +12,6 @@ class Role extends Model
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $fillable = [ protected $fillable = [
'name', 'description', 'created_at', 'created_by', 'updated_at', 'updated_by' 'name', 'description', 'default_page', 'created_at', 'created_by', 'updated_at', 'updated_by'
]; ];
} }

Loading…
Cancel
Save