PHP code example of hello-i-am-pavel / orchid-infinite-scroll
1. Go to this page and download the library: Download hello-i-am-pavel/orchid-infinite-scroll library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hello-i-am-pavel / orchid-infinite-scroll example snippets
use Hiap\OrchidInfiniteScroll\Orchid\Layouts\InfiniteScrollTable;
use Orchid\Screen\TD;
class UsersTableLayout extends InfiniteScrollTable
{
protected function columns(): iterable
{
return [
TD::make('id', 'ID')->width('100px'),
TD::make('name', 'Имя'),
TD::make('email', 'Email'),
];
}
}
public function query(): iterable
{
return [
'items' => User::paginate(15),
];
}
public function layout(): iterable
{
return [
UsersTableLayout::class,
];
}