Laravel Charts: Passing variable to handler function
问题 I followed the guide on https://charts.erik.cat/guide/ to install Chartisan with echarts in my Laravel 7.4 framework. Everything works fine and I receive a chart. The chart is triggered with this handler function: public function handler(Request $request): Chartisan { return Chartisan::build() ->labels(['First', 'Second', 'Third']) ->dataset('Sample', [1, 2, 3]) ->dataset('Sample 2', [3, 2, 1]); } The dataset shall be pulled from my database therefore I modify the code to: public function