public function first(array $views, $data = [], $mergeData = [])
    {
        $view = Arr::first($views, function ($view) {
            return $this->exists($view);
        });

        if (! $view) {
            throw new InvalidArgumentException('None of the views in the given array exist.');
        }

        return $this->make($view, $data, $mergeData);
    }
public function first(array $views, $data = [], $mergeData = [])
    {
        $view = Arr::first($views, function ($view) {
            return $this->exists($view);
        });

        if (! $view) {
            throw new InvalidArgumentException('None of the views in the given array exist.');
        }

        return $this->make($view, $data, $mergeData);
    }
public function first ( array $ views , $ data = [ ] , $ mergeData = [ ] ) { $ view = Arr :: first ( $ views , function ( $ view ) { return $ this -> exists ( $ view ) ; } ) ; if ( ! $ view ) { throw new InvalidArgumentException ( 'None of the views in the given array exist.' ) ; } return $ this -> make ( $ view , $ data , $ mergeData ) ; }
Get the first view that actually exists from the given list.

@param  array  $views
@param  \Illuminate\Contracts\Support\Arrayable|array   $data
@param  array   $mergeData
@return \Illuminate\Contracts\View\View

@throws \InvalidArgumentException
Get the first view that actually exists from the given list .