protect(function (Request $request, Application $app) { if ($request->attributes->has('token')) { $request->attributes->set('token', $app['converter.token']->convert($request->attributes->get('token'))); } }); } public function boot(Application $app) { } }