Aby renderować dane w szablonie wykresu
$graph = view('graph')->with('graph', $graph);
I zwracać renderowane dane do wiadomości
return view('coin.news', compact('graph','news'));
Kod końcowy
$graph = Charts::database(Graph::find(1),'line','highcharts')
->title('Tokens')
->ElementLabel('Coins Sold')
->Responsive(true)
->dimensions(1000,500)
->data(Graph::find(1));
$news = News::all();
$graph = view('graph')->with('graph', $graph);
return view('coin.news', compact('graph','news'));