File tree Expand file tree Collapse file tree 2 files changed +7
-22
lines changed Expand file tree Collapse file tree 2 files changed +7
-22
lines changed Original file line number Diff line number Diff line change 337
337
],
338
338
],
339
339
],
340
- [
341
- 'text ' => 'OpenKab ' ,
342
- 'icon ' => 'fas fa-city ' ,
343
- 'can ' => 'laporan.openkab.view ' ,
344
- 'submenu ' => [
345
- [
346
- 'text ' => 'Dasbor ' ,
347
- 'url ' => 'laporan/openkab ' ,
348
- 'can ' => 'laporan.openkab.view ' ,
349
- ],
350
- [
351
- 'text ' => 'Pengguna Aktif ' ,
352
- 'url ' => 'laporan/openkab/pengguna ' ,
353
- 'can ' => 'laporan.openkab-pengguna.view ' ,
354
- ],
355
- ],
356
- ],
357
340
[
358
341
'text ' => 'LayananDesa ' ,
359
342
'icon ' => 'fas fa-file-alt ' ,
413
396
'url ' => 'openkab/dashboard ' ,
414
397
],
415
398
[
416
- 'text ' => 'Pengguna ' ,
417
- 'url ' => 'openkab/pengguna ' ,
399
+ 'text ' => 'Dasbor ' ,
400
+ 'url ' => 'laporan/openkab ' ,
401
+ 'can ' => 'laporan.openkab.view ' ,
418
402
],
419
403
[
420
404
'text ' => 'Pengguna Aktif ' ,
421
- 'url ' => 'openkab/pengguna ' ,
405
+ 'url ' => 'laporan/openkab/pengguna ' ,
406
+ 'can ' => 'laporan.openkab-pengguna.view ' ,
422
407
],
423
408
[
424
409
'text ' => 'API Satu Data ' ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public function up(): void
19
19
app ()[\Spatie \Permission \PermissionRegistrar::class]->forgetCachedPermissions ();
20
20
21
21
foreach ($ this ->permissions as $ permission ) {
22
- Permission::create (['name ' => $ permission ]);
22
+ Permission::firstOrCreate (['name ' => $ permission ]);
23
23
}
24
24
25
25
// Assign permissions to roles
@@ -29,7 +29,7 @@ public function up(): void
29
29
30
30
if ($ adminRole ) {
31
31
// Admin gets all permissions
32
- $ adminRole ->givePermissionTo (Permission:: all () );
32
+ $ adminRole ->givePermissionTo ($ this -> permissions );
33
33
}
34
34
35
35
if ($ adminWilayahRole ) {
You can’t perform that action at this time.
0 commit comments