public function renderWhen($condition, $view, $data = [], $mergeData = [])
    {
        if (! $condition) {
            return '';
        }

        return $this->make($view, $this->parseData($data), $mergeData)->render();
    }
public function renderWhen($condition, $view, $data = [], $mergeData = [])
    {
        if (! $condition) {
            return '';
        }

        return $this->make($view, $this->parseData($data), $mergeData)->render();
    }
public function renderWhen ( $ condition , $ view , $ data = [ ] , $ mergeData = [ ] ) { if ( ! $ condition ) { return '' ; } return $ this -> make ( $ view , $ this -> parseData ( $ data ) , $ mergeData ) -> render ( ) ; }
Get the rendered content of the view based on a given condition.

@param  bool  $condition
@param  string  $view
@param  \Illuminate\Contracts\Support\Arrayable|array   $data
@param  array   $mergeData
@return string
Get the rendered content of the view based on a given condition .