mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 04:01:24 +00:00
Use function to call paginator
This commit is contained in:
@@ -13,6 +13,7 @@ use App\Models\Settings;
|
||||
use Blacklight\Contents;
|
||||
use App\Models\Forumpost;
|
||||
use App\Models\RoleExcludedCategory;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class BasePageController extends Controller
|
||||
@@ -92,6 +93,19 @@ class BasePageController extends Controller
|
||||
$this->smarty->assign('serverroot', url('/'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $query
|
||||
* @param $totalcount
|
||||
* @param $items
|
||||
* @param $page
|
||||
* @param $path
|
||||
* @return \Illuminate\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public function paginate($query, $totalcount, $items, $page, $path)
|
||||
{
|
||||
return new LengthAwarePaginator($query, $totalcount, $items, $page, ['path' => $path]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user