diff --git a/app/Http/Controllers/RoleController.php b/app/Http/Controllers/RoleController.php index 4a29066..57b8c58 100644 --- a/app/Http/Controllers/RoleController.php +++ b/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); diff --git a/app/Models/Role.php b/app/Models/Role.php index 0363567..73de4a2 100644 --- a/app/Models/Role.php +++ b/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' ]; }