We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c01dc44 commit 99ef6e6Copy full SHA for 99ef6e6
src/Router.php
@@ -325,6 +325,19 @@ public static function redirect(
325
});
326
}
327
328
+ /**
329
+ * Add a route that renders a view
330
+ *
331
+ * @param string $pattern The route pattern/path to match
332
+ * @param string $view The view to render
333
+ */
334
+ public static function view(string $pattern, string $view)
335
+ {
336
+ static::get($pattern, function () use ($view) {
337
+ return response()->view($view);
338
+ });
339
+ }
340
+
341
/**
342
* Create a resource route for using controllers.
343
*
0 commit comments