Welcome Guest, Not a member yet? Register   Sign In
Error at RouteCollection
#1
Wink 

{
        $to = static fn (...$data) => service('renderer')
            ->setData(['segments' => $data], 'raw')
            ->render($view, $options);

        $routeOptions = $options ?? [];
        $routeOptions = array_merge($routeOptions, ['view' => $view]);

        $this->create(Method::GET, $from, $to, $routeOptions);

        return $this;
    }

My Terminal says that my "fn" is incorrect:
"Syntax error: unexpected token 'fn'"
Reply


Messages In This Thread
Error at RouteCollection - by AlceuNeto - 09-18-2024, 12:12 PM
RE: Error at RouteCollection - by kenjis - 09-18-2024, 06:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB