-
Notifications
You must be signed in to change notification settings - Fork 0
09. Helpers
Simon Striekwold edited this page Mar 29, 2018
·
1 revision
Helpers are classes that preform some specific function to assist development. The default framework only contains one helper but you can easily add more as the project needs them.
Helpers are located in the base/helpers
folder. To add a new helper create a new file in this folder with the name example_helper.php
, containing a class called ExampleHelper
.
To use a helper you need to require it in the file it will used in. Because all request execution originates from index.php
, all requires have the same path:
require "base/helpers/example_helper.php";
The default helper can be used to easily add Bootstrap4 pagination to a view.
<?= BootstrapHelper::Pagination( $totalPages, $currentPage ) ?>