How does laravel use UrlWindow?

look at the link description when looking at the paging
the blogger says that what is provided at the bottom of the laravel needs to use. I directly use UrlWindow; what"s wrong?
$window = UrlWindow::make ($posts);

public function fetch()
{
    // 62
    $posts = Post::paginate(6)->onEachSide(2)->withPath(url("post"));
    // URL
    $window = UrlWindow::make($posts);
    $pages = array_filter([
        $window["first"],
        is_array($window["slider"]) ? "..." : null,
        $window["slider"],
        is_array($window["last"]) ? "..." : null,
        $window["last"],
    ]);
    return response()->json([
        "paginator" => $posts,
        "elements" => $pages
    ]);
}
May.03,2022

use Illuminate\Pagination\UrlWindow;
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3aeee-2c248.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3aeee-2c248.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?