Skip to content

Commit

Permalink
Adding a setCurrentPage method to the base controller
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Dec 3, 2015
1 parent 8557e9c commit 4a6a18a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Bases/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract class Controller extends IlluminateController
*/
public function __construct()
{
$this->setData('page', '');
$this->setCurrentPage();
}

/* ------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -74,6 +74,18 @@ protected function setData($name, $value = null)
return $this;
}

/**
* Set the current page.
*
* @param string $page
*
* @return self
*/
private function setCurrentPage($page = '')
{
return $this->setData('current_page', $page);
}

/* ------------------------------------------------------------------------------------------------
| Check Functions
| ------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 4a6a18a

Please sign in to comment.