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.
namespace App\Http\Controllers;
use App\Models\User;
use dobron\BigPipe\AsyncResponse;
class UsersController extends Controller
{
private $response;
public function __construct(AsyncResponse $response)
{
$this->response = $response;
}
public function loadMore(Request $request)
{
...
$this->response->appendContent('#users > tbody', view('app.users.partials.table-body', compact('users')));
return $this->response->send();
}
}
82%
178
Orders
16%
170
Users
If it is not possible to use the ajaxify attribute, you can use AsyncRequest & AsyncResponse methods to do the same thing.
In this example, we use the ajaxify and rel attributes. They respond to the click event which calls AsyncRequest and displays the phone number.
It is not always appropriate to use DOMOPS. You can call a specific class method or a regular function with the custom arguments.