Session api token validation
This commit is contained in:
1 parent
cd1538ba12
commit
fcba639bae
25 files changed
+491
-235
No files matched your search
@@ -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