Topic: Laravel & Filament Development
I need to write a Laravel Middleware blocking users whose ip is not the array assigned inside middleware.

Topic: Laravel & Filament Development
i have a laravel + inertia + vue app that deals with business names. users can login/register or just use the app as guests. they can add and remove names to/from a favorites list. what i need are two things: 1. a class FavoritesManager that handles adding and removing names to/from the list; when we have a logged in user they should be saved to db; when it's a guest they should be saved to the session; 2. a controller that acts as an api to connect the vue frontend to this class. p. s.: we'll deal with the frontend later, so at this point we just create the backend. here's my empty classes: <?php

namespace App\Favorites;

use App\Models\User;
use App\Models\Favorite;

class FavoritesManager
{
    
}
<?php

namespace App\Http\Controllers;

use App\Favorites\FavoritesManager;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class FavoritesController extends Controller
{
    
}