diff --git a/app/Http/Controllers/GraphController.php b/app/Http/Controllers/GraphController.php index 7cdd87c..ec47700 100644 --- a/app/Http/Controllers/GraphController.php +++ b/app/Http/Controllers/GraphController.php @@ -26,7 +26,7 @@ public function index(Request $request) } $nodes = $query->clone() - ->whereIn('id',collect($items->pluck('json_items')->flatten()) + ->whereIn('id', collect($items->pluck('json_items')->flatten()) ->merge($items->pluck('id')) ->merge($pythonItem->id) ->unique() @@ -35,8 +35,8 @@ public function index(Request $request) return Inertia::render('Items/Graph', [ 'items' => $items->get(), 'nodes' => $nodes->get(), - 'python' => fn () => $pythonItem, - 'initialSelectedItems' => fn () => Item::whereIn('id', $request->session()->get('selected') ?? [])->get(), + 'python' => static fn () => $pythonItem, + 'initialSelectedItems' => static fn () => Item::whereIn('id', $request->session()->get('selected') ?? [])->get(), ]); } diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index a6238f5..0b99ed5 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -7,7 +7,6 @@ use App\Models\Question; use Carbon\Carbon; use Illuminate\Http\Request; - use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Storage; use Inertia\Inertia; @@ -36,7 +35,7 @@ public function index(Request $request) 'initialFilters' => $filters, 'questions' => Question::with('answers.attributes:id')->get(), 'initialSelectedItems' => Item::whereIn('id', $request->session()->get('selected') ?? [])->get(), - 'explainer' => Carbon::now()->timestamp>=Session::get('explainer') ?? 0, + 'explainer' => Carbon::now()->timestamp >= Session::get('explainer') ?? 0, ]); } diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index b6a1284..3867f22 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -2,7 +2,6 @@ namespace App\Http\Middleware; -use App\Models\Item; use Illuminate\Http\Request; use Inertia\Middleware;