Browse Source

default page

pull/3/head
wahyu 1 year ago
parent
commit
3270b42a77
  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['created_by'] = $this->currentName;
if (!isset($data['default_page'])) {
$data['default_page'] = 29; // dashboard
}
$result = Role::create($data);

2
app/Models/Role.php

@ -12,6 +12,6 @@ class Role extends Model
const UPDATED_AT = 'updated_at';
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