This gets every single row in your database
$biniyojan = BiniyojanDetails::get();
So you cannot get a property of it like that. Get one item maybe? I'm not sure what you are trying to do so it's hard to give advice
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I wanted to fetch data by comparing some data but i got an error Property does not exists. I don't know where i am wrong.
Controller
public function SchoolReportToAdmin()
{
$biniyojan = BiniyojanDetails::get();
$school_data = school_bini::where('kriyakalap', $biniyojan->kriyakalap)->get();
dd($school_data);
return view('schoolDataToAdmin');
}
BiniyojanDetails Table columns
`details_id`, `biniyojan_id`, `school`, `school_id`, `source`, `kriyakalap`, `debit_credit`, `debit_credit_type`, `rev_kriyakalap`, `rev_debit_credit_type`, `cash`, `rev_cash`, `created_at`, `updated_at`
school_bini Table columns
`id`, `school_id`, `date`, `ab`, `behora`, `kriyakalap`, `debit_credit`, `debit_credit_type`, `sub_topic`, `summary`, `cash`, `completed`, `created_at`, `updated_at`
Even dd() shows same error
Or in theory if you have few records in the first query
$biniyojan = BiniyojanDetails::pluck('kriyakalap');
$school_data = school_bini::whereIn('kriyakalap', $biniyojan)->get();
dd($school_data);
Please or to participate in this conversation.