Skip to content

Commit

Permalink
Use request::wasFromTurboNative
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Sep 11, 2023
1 parent ed96b1b commit 589fcca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions workbench/app/Http/Controllers/ArticlesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

namespace Workbench\App\Http\Controllers;

use HotwiredLaravel\TurboLaravel\Facades\Turbo;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Workbench\App\Models\Article;

class ArticlesController
{
public function index()
public function index(Request $request)
{
if (Turbo::isTurboNativeVisit()) {
if ($request->wasFromTurboNative()) {
return Article::query()
->latest()
->paginate();
Expand Down

0 comments on commit 589fcca

Please sign in to comment.