You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
460 B
22 lines
460 B
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\User;
|
|
|
|
class UserMarriagesController extends Controller
|
|
{
|
|
/**
|
|
* Show user marriage list.
|
|
*
|
|
* @param \App\User $user
|
|
* @return \Illuminate\View\View
|
|
*/
|
|
public function index(User $user)
|
|
{
|
|
$marriages = $user->marriages()->with('husband', 'wife')
|
|
->withCount('childs')->get();
|
|
|
|
return view('users.marriages', compact('user', 'marriages'));
|
|
}
|
|
}
|