Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Protected function example
<?php
namespace App;
use Sober\Controller\Controller;
class FrontPage extends Controller
{
/**
* This function will be represented as $test_variable in single-product.blade.php file.
*
* @return string.
*/
public function custom_title() {
$this->_custom_title();
}
/**
* Protected function will be used as internal controller methods, because all the public methods are exposed.
*
* @return string.
*/
protected function _custom_title() {
return 'Front Page custom title';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment