Skip to content

Commit fe53315

Browse files
committed
fix: Config caching issue
1 parent d01f61f commit fe53315

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

app/Models/Package.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
class Package extends Model implements HasMedia
3333
{
3434
use Filterable;
35+
// TODO: Fix admin detector in laravel model status package
3536
use HasActiveScope;
3637
use HasSlug;
3738
use HasStatus;

config/model-status.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
use Illuminate\Support\Facades\Auth;
4-
53
return [
64

75
/*
@@ -27,7 +25,7 @@
2725
| The default is set to 10 characters, which is enough for "active"/"inactive".
2826
|
2927
*/
30-
'column_length' => env('MODEL_STATUS_COLUMN_LENGTH', 'inactive'),
28+
'column_length' => env('MODEL_STATUS_COLUMN_LENGTH', 10),
3129

3230
/*
3331
|--------------------------------------------------------------------------
@@ -71,7 +69,5 @@
7169
| }
7270
|
7371
*/
74-
'admin_detector' => function () {
75-
return Auth::check() && Auth::user()->is_admin;
76-
},
72+
'admin_detector' => 'is_admin', // TODO: Fix admin detector in laravel model status package
7773
];

0 commit comments

Comments
 (0)