a request every 2.5 s
A request on an interval
Where the ajaxify attribute does not fit, AsyncRequest sends the request from JavaScript; the response replaces the numbers with setContent.
Sets the content of an element.
Insert content as the last child of specified element.
Insert content as the first child of specified element.
Insert content after specified element.
Insert content before specified element.
Remove specified element and its children.
Replace specified element with content.
Evaluates JavaScript code represented as a string. Deprecated: call a JavaScript module instead.
namespace App\Http\Controllers;
use App\Arch\BigPipe\AsyncResponse;
class PostController extends Controller
{
public function loadMore(Request $request)
{
...
return (new AsyncResponse())
->appendContent('#posts', view('posts.items', compact('posts'))->render())
->send();
}
}
a request every 2.5 s
Where the ajaxify attribute does not fit, AsyncRequest sends the request from JavaScript; the response replaces the numbers with setContent.
The ajaxify and rel attributes send the request; the response replaces the clicked link with the number.
Not everything is a DOM operation: the response calls the set() method of tutorial/Image with a URL.