Changed chart generation into a laravel controller