Skip to content

Commit 4a6a18a

Browse files
Adding a setCurrentPage method to the base controller
1 parent 8557e9c commit 4a6a18a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Bases/Controller.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class Controller extends IlluminateController
3737
*/
3838
public function __construct()
3939
{
40-
$this->setData('page', '');
40+
$this->setCurrentPage();
4141
}
4242

4343
/* ------------------------------------------------------------------------------------------------
@@ -74,6 +74,18 @@ protected function setData($name, $value = null)
7474
return $this;
7575
}
7676

77+
/**
78+
* Set the current page.
79+
*
80+
* @param string $page
81+
*
82+
* @return self
83+
*/
84+
private function setCurrentPage($page = '')
85+
{
86+
return $this->setData('current_page', $page);
87+
}
88+
7789
/* ------------------------------------------------------------------------------------------------
7890
| Check Functions
7991
| ------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)