Factory
class Factory (View source)
Properties
protected Request | $request | The request instance. | |
protected Factory | $view | The view factory instance. | |
protected TranslatorInterface | $trans | The translator implementation. | |
protected string | $viewName | The name of the pagination view. | |
protected int | $currentPage | The number of the current page. | |
protected string | $locale | The locale to be used by the translator. | |
protected string | $baseUrl | The base URL in use by the paginator. | |
protected string | $pageName | The input parameter used for the current page. |
Methods
void | __construct(Request $request, Factory $view, TranslatorInterface $trans, string $pageName = 'page') Create a new pagination factory. | |
void | setupPaginationEnvironment() Setup the pagination environment. | |
Paginator | make(array $items, int $total, int|null $perPage = null) Get a new paginator instance. | |
View | getPaginationView(Paginator $paginator, string $view = null) Get the pagination view. | |
int | getCurrentPage() Get the number of the current page. | |
void | setCurrentPage(int $number) Set the number of the current page. | |
string | getCurrentUrl() Get the root URL for the request. | |
void | setBaseUrl(string $baseUrl) Set the base URL in use by the paginator. | |
void | setPageName(string $pageName) Set the input page parameter name used by the paginator. | |
string | getPageName() Get the input page parameter name used by the paginator. | |
string | getViewName(string $view = null) Get the name of the pagination view. | |
void | setViewName(string $viewName) Set the name of the pagination view. | |
string | getLocale() Get the locale of the paginator. | |
void | setLocale(string $locale) Set the locale of the paginator. | |
Request | getRequest() Get the active request instance. | |
void | setRequest(Request $request) Set the active request instance. | |
Factory | getViewFactory() Get the current view factory. | |
void | setViewFactory(Factory $view) Set the current view factory. | |
TranslatorInterface | getTranslator() Get the translator instance. |
Details
void __construct(Request $request, Factory $view, TranslatorInterface $trans, string $pageName = 'page')
Create a new pagination factory.
protected void setupPaginationEnvironment()
Setup the pagination environment.
Paginator make(array $items, int $total, int|null $perPage = null)
Get a new paginator instance.
int getCurrentPage()
Get the number of the current page.
void setCurrentPage(int $number)
Set the number of the current page.
string getCurrentUrl()
Get the root URL for the request.
void setBaseUrl(string $baseUrl)
Set the base URL in use by the paginator.
void setPageName(string $pageName)
Set the input page parameter name used by the paginator.
string getPageName()
Get the input page parameter name used by the paginator.
string getViewName(string $view = null)
Get the name of the pagination view.
void setViewName(string $viewName)
Set the name of the pagination view.
string getLocale()
Get the locale of the paginator.
void setLocale(string $locale)
Set the locale of the paginator.
Request getRequest()
Get the active request instance.
void setRequest(Request $request)
Set the active request instance.
Factory getViewFactory()
Get the current view factory.
void setViewFactory(Factory $view)
Set the current view factory.
TranslatorInterface getTranslator()
Get the translator instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Pagination/Factory.html