public function layout($name = null, $variable = 'content')
    {
        $this->layout = array(
            'name' => $name ?: $this->defaultLayout,
            'variable' => $variable
        );
        return $this;
    }
public function layout($name = null, $variable = 'content')
    {
        $this->layout = array(
            'name' => $name ?: $this->defaultLayout,
            'variable' => $variable
        );
        return $this;
    }
public function layout ( $ name = null , $ variable = 'content' ) { $ this -> layout = array ( 'name' => $ name ? : $ this -> defaultLayout , 'variable' => $ variable ) ; return $ this ; }
Set layout file for current view

@param string $name The name of layout template
@param string $variable The variable name of layout content
@return $this
Set layout file for current view