AB
Size: a a a
AB
K
K
AB
K
AB
K
Route::post('loadmore.load_data', 'CategoryController@load_data')->name('loadmore.load_data');
Вот мой post запросK
if($request->ajax())
{
if($request->id > 0)
{
$data = $category
->videos()
->where('id', '<', $request->id)
->orderBy('created_at', 'DESC')
->limit(5)
->map(function (Video $video) use ($category) {
return $video->setRelation('category', $category);
});
}
else
{
$data = $category
->videos()
->orderBy('id', 'DESC')
->limit(4)
->get()
->map(function (Video $video) use ($category) {
return $video->setRelation('category', $category);
});
}
K
K
E
->where('id', '<', $request->id)
E
AB
AB
E
E
C
K
->where('id', '<', $request->id)
E
E