checking for a number of moons
This commit is contained in:
@@ -15,8 +15,7 @@ class MoonsController extends Controller
|
||||
public function displayMoons() {
|
||||
$moons = DB::table('moons')->get();
|
||||
|
||||
//return view('moons.moon')->with('moons', $moons);
|
||||
return view('moons.moon', compact('moons'));
|
||||
return view('moons.moon')->with($moons);
|
||||
}
|
||||
|
||||
public function addMoon() {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<th>Rental End</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(sizeof($moons) > 0)
|
||||
@foreach ($moons as $moon)
|
||||
<tr>
|
||||
<td>{{ $moon->system }}</td>
|
||||
@@ -36,6 +37,7 @@
|
||||
<td>{{ $moon->rentend }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user