src/Http/Router/Route.php
public static function view($url, $view, $data = null)
    {
        $callback = function () use ($view, $data) {
            $view = view($view);

            if (!is_null($data)) {
                foreach ($data as $key => $value) {
                    $view = $view->with($key, $value);
                }
            }

            return $view;
        };

        static::get($url, $callback);
    }
public static function view($url, $view, $data = null)
    {
        $callback = function () use ($view, $data) {
            $view = view($view);

            if (!is_null($data)) {
                foreach ($data as $key => $value) {
                    $view = $view->with($key, $value);
                }
            }

            return $view;
        };

        static::get($url, $callback);
    }
public static function view ( $ url , $ view , $ data = null ) { $ callback = function ( ) use ( $ view , $ data ) { $ view = view ( $ view ) ; if ( ! is_null ( $ data ) ) { foreach ( $ data as $ key => $ value ) { $ view = $ view -> with ( $ key , $ value ) ; } } return $ view ; } ; static :: get ( $ url , $ callback ) ; }
Show view in route call.

@param $url
@param $view

@return $this
Show view in route call .