src/Classes/Pages.php
public function getView($name, $data = [])
    {
        $view = 'missing-page';

        if (view()->exists('page::' . $name)) {
            $view = $name;
        }

        return view('page::' . $view, $data);
    }
public function getView($name, $data = [])
    {
        $view = 'missing-page';

        if (view()->exists('page::' . $name)) {
            $view = $name;
        }

        return view('page::' . $view, $data);
    }
public function getView ( $ name , $ data = [ ] ) { $ view = 'missing-page' ; if ( view ( ) -> exists ( 'page::' . $ name ) ) { $ view = $ name ; } return view ( 'page::' . $ view , $ data ) ; }
Search and Load the view or fallbacks to specific view

@param  string $name The name of the view
@param  array  $data View data
@return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
Search and Load the view or fallbacks to specific view