Replace usage of array_ helper with Arr class directly to prepare for Laravel 5.8 changes

This commit is contained in:
DariusIII
2019-01-29 13:52:01 +01:00
parent 4b4de3acef
commit 08b8edbe2d
23 changed files with 57 additions and 34 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ use Blacklight\Genres;
use Blacklight\Console;
use App\Models\Category;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
class ConsoleController extends BasePageController
{
@@ -35,7 +36,7 @@ class ConsoleController extends BasePageController
];
}
$category = Category::GAME_ROOT;
if ($id && \in_array($id, array_pluck($ctmp, 'title'), false)) {
if ($id && \in_array($id, Arr::pluck($ctmp, 'title'), false)) {
$cat = Category::query()
->where('title', $id)
->where('parentid', '=', Category::GAME_ROOT)