Wrong model used in getRoleCategoryExclusion function

This commit is contained in:
DariusIII
2017-10-17 01:45:52 +02:00
parent 6c78b11650
commit 4d19dbf58d
3 changed files with 7 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
2017-10-17 DariusIII
* Fix: Wrong model used in getRoleCategoryExclusion function
2017-10-16 DariusIII
* Chg: Update laravel/framework and phpunit to latest versions
* Fix: Fix path to jquery-goup in Gentele theme
+3 -1
View File
@@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class RoleExcludedCategory extends Model
{
//
protected $dateFormat = false;
protected $guarded = [];
}
+2 -1
View File
@@ -2,6 +2,7 @@
namespace nntmux;
use App\Models\RoleExcludedCategory;
use nntmux\db\DB;
use Carbon\Carbon;
use App\Models\User;
@@ -1001,7 +1002,7 @@ class Users
public function getRoleCategoryExclusion($role): array
{
$ret = [];
$categories = UserExcludedCategory::query()->where('role', $role)->get(['categories_id']);
$categories = RoleExcludedCategory::query()->where('role', $role)->get(['categories_id']);
foreach ($categories as $category) {
$ret[] = $category['categories_id'];
}