app/Widgets/RolesCount.php
/**
     * Treat this method as a controller action.
     * Return view() or other content to display.
     */
Treat this method as a controller action.
Return view() or other content to display.
Treat this method as a controller action . Return view () or other content to display .
public function run()
    {
        $this->config = [
            'count' => Role::count(),
        ];
        return view('widgets.roles_count', [
            'config' => $this->config,
        ]);
    }
public function run ( ) { $ this -> config = [ 'count' => Role :: count ( ) , ] ; return view ( 'widgets.roles_count' , [ 'config' => $ this -> config , ] ) ; }
Treat this method as a controller action.
Treat this method as a controller action .