blade template

This commit is contained in:
2018-10-25 20:51:43 -05:00
parent d0717b7a95
commit 09351d72b8
2 changed files with 19 additions and 9 deletions

View File

@@ -14,15 +14,8 @@ class MoonsController extends Controller
{
public function displayMoons() {
$moons = DB::table('moons')->get();
$moonsHtml = '';
foreach($moons as $moon) {
$moonsHtml .= '<td>' . $moon->system . '</td>';
$moonsHtml .= '<td>' . $moon->strucure . '</td>';
$moonsHtml .= '<td>' . $moon->firstore . '</td>';
$moonsHtml .= '<td>' . $moon->firstquan . '</td>';
}
return view('moons.moon')->with($moonsHtml);
return view('moons.moon')->with($moons);
}
public function addMoon() {