Untuk merender data Dalam template grafik
$graph = view('graph')->with('graph', $graph);
Dan untuk mengembalikan data yang dirender ke berita
return view('coin.news', compact('graph','news'));
Kode akhir
$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'));