Php 如何在func';onStart';

Php 如何在func';onStart';,php,laravel,octobercms,octobercms-plugins,Php,Laravel,Octobercms,Octobercms Plugins,我有插件用户在10月cms。我可以在页面中使用{{user.name},但是如何在函数onStart上使用它您可以使用Auth::fascade $user = Auth::getUser(); 向我们展示您的代码,以便我们提供帮助。

我有插件用户在10月cms。我可以在页面中使用
{{user.name}
,但是如何在函数onStart上使用它

您可以使用Auth::fascade

$user = Auth::getUser();

向我们展示您的代码,以便我们提供帮助。