Closed dottd-admin closed 4 years ago
You'd just create another method.
/**
* Returns the footer navigation.
*
* @return array
*/
public function footerNav()
{
if (Navi::build('footer_navigation')->isEmpty()) {
return;
}
return Navi::build('footer_navigation')->toArray();
}
and then add 'footerNav' => $this->footerNav()
to $with
That done the trick perfectly. Thanks 👍
If setting up multiple navs can this be adapted to return also a secondary nav eg. footer nav? So essentially, without the need to create separate php files for each nav?