This pull request adds the with method to the class API, so it can be used to render data on the view. Example:
<?php
namespace App\Livewire;
use Livewire\WithPagination;
use Livewire\Volt\Component;
use App\Models\Post;
new class extends Component
{
use WithPagination;
public function with()
{
return [
'posts' => Post::paginate(10),
];
}
}
This pull request adds the
with
method to the class API, so it can be used to renderdata
on the view. Example: