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
#2

PHP version 8.1 or newer is required
https://www.codeigniter.com/user_guide/i...extensions
Reply




Theme © iAndrew 2016 - Forum software by © MyBB