Session api token validation
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
||||
use App\Models\UserFlight;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Inertia\Inertia;
|
||||
use Inertia\Response;
|
||||
|
||||
@@ -14,9 +15,9 @@ class HomePageController extends Controller
|
||||
{
|
||||
return Cache::remember('splash_flights', now()->addHours(12), function () {
|
||||
return UserFlight::query()
|
||||
->with(['departureAirport', 'arrivalAirport'])
|
||||
->with(['departureAirport', 'arrivalAirport', 'user'])
|
||||
->whereHas('user', function ($query) {
|
||||
$query->whereRaw("settings->>'profile_privacy' is distinct from 'private'");
|
||||
$query->whereRaw(DB::raw("settings->>'profile_privacy' is distinct from 'private'"));
|
||||
})
|
||||
->orderByDesc('departure_date')
|
||||
->limit(50)
|
||||
|
||||
Reference in New Issue
Block a user