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\Music;
use Blacklight\Genres;
use App\Models\Category;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
class MusicController extends BasePageController
{
@@ -32,7 +33,7 @@ class MusicController extends BasePageController
}
$category = Category::MUSIC_ROOT;
if ($id && \in_array($id, array_pluck($mtmp, 'title'), false)) {
if ($id && \in_array($id, Arr::pluck($mtmp, 'title'), false)) {
$cat = Category::query()
->where('title', $id)
->where('parentid', '=', Category::MUSIC_ROOT)