File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 * So you can use `$this` to reference the application class instance
3030 * if required.
3131 */
32- return function (RouteBuilder $ routes ) {
32+ return function (RouteBuilder $ routes ): void {
3333 /*
3434 * The default class to use for all routes
3535 *
4949 */
5050 $ routes ->setRouteClass (DashedRoute::class);
5151
52- $ routes ->scope ('/ ' , function (RouteBuilder $ builder ) {
52+ $ routes ->scope ('/ ' , function (RouteBuilder $ builder ): void {
5353 /*
5454 * Here, we are connecting '/' (base path) to a controller called 'Pages',
5555 * its action called 'display', and we pass a param to select the view file
8383 * open new scope and define routes there.
8484 *
8585 * ```
86- * $routes->scope('/api', function (RouteBuilder $builder) {
86+ * $routes->scope('/api', function (RouteBuilder $builder): void {
8787 * // No $builder->applyMiddleware() here.
8888 *
8989 * // Parse specified extensions from URLs
You can’t perform that action at this time.
0 commit comments