custom moon test

This commit is contained in:
2018-10-25 20:43:58 -05:00
parent 239839cae7
commit d0717b7a95
2 changed files with 10 additions and 9 deletions

View File

@@ -14,8 +14,15 @@ class MoonsController extends Controller
{
public function displayMoons() {
$moons = DB::table('moons')->get();
return view('moons.moon')->with($moons);
$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);
}
public function addMoon() {