I’m following the tutorial of the Authorization plugin and Im facing issues at
$request->getFlash()->error( ‘You are not authorized to access that location’ );
I get the following message:
Method “getFlash()” does not exist, BadMethodCallException
Using get_class() I know $request is an instance of Cake/Http/ServerRequest and according to the API the method should exist.
Also, looking into vendor/cakephp/cakephp/src/Http/ServerRequest.php I cant find that method.
PD: using CakePHP v4.1.7