顧客には多くのアカウントがあり、アカウントには多くのトランザクションがあります。
1 人の顧客からすべてのトランザクションを取得したい..?
$customer = Auth::user();
$statement = $customers->accounts()->transactions()->where('customer_no', '=', $customer->customer_no)->get(); //get all transactions
私はこれがうまくいかないことを知っていますが、これは私が得ることができる最も近いものです..