diff --git a/app/Filters/Users/SearchFilter.php b/app/Filters/Users/SearchFilter.php index f95a815..27440ce 100644 --- a/app/Filters/Users/SearchFilter.php +++ b/app/Filters/Users/SearchFilter.php @@ -10,8 +10,10 @@ function __invoke(Builder $query, string $search): Builder { $match = '%'.$search.'%'; - return $query->where('username', 'LIKE', $match) + return $query->where(fn($query) => $query + ->where('username', 'LIKE', $match) ->orWhere('email', 'LIKE', $match) - ->orWhere('description', 'LIKE', $match); + ->orWhere('description', 'LIKE', $match) + ); } } diff --git a/app/Helpers/Parser.php b/app/Helpers/Parser.php index 87606ba..ac899f6 100644 --- a/app/Helpers/Parser.php +++ b/app/Helpers/Parser.php @@ -46,7 +46,7 @@ private static function parseTimeCodes(string $string): string|null return $carry + $times[$index] * pow(60, $index); } , 0); - return ""; + return ""; }, $string); } diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index bc01cf9..4e6cb0d 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -17,6 +17,7 @@ class UserController public function index (UserFilters $filters) : View { return view('admin.users.index', [ 'users' => User::filter($filters) + ->with('premium_subscription') ->withCount([ 'subscribers', 'videos', diff --git a/app/Models/User.php b/app/Models/User.php index 0e8e1d3..dc5906e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,7 +2,6 @@ namespace App\Models; -use App\Enums\VideoStatus; use App\Models\Interfaces\Likeable; use App\Models\Interfaces\Reportable; use App\Models\Pivots\FavoritePlaylist; @@ -21,7 +20,6 @@ use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; diff --git a/resources/views/layouts/menus/sidebars/front.blade.php b/resources/views/layouts/menus/sidebars/front.blade.php index dc9716e..65df1f7 100644 --- a/resources/views/layouts/menus/sidebars/front.blade.php +++ b/resources/views/layouts/menus/sidebars/front.blade.php @@ -1,5 +1,5 @@
$show_sidebar ]) id="responsive-sidebar" data-bs-keyboard="false" data-bs-backdrop="true" data-bs-scroll="true" aria-modal="true" role="dialog"> -
$show_sidebar, 'd-flex gap-2' => Auth::user()?->is_premium, 'justify-content-between' => !Auth::user()?->is_premium])> +
$show_sidebar, 'd-flex gap-2' => Auth::user()?->is_premium, 'justify-content-between' => !Auth::user()?->is_premium])> Auth::user()?->is_premium, 'h5' => !Auth::user()?->is_premium])