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