Hello guys i am new on laravel and am currently working on laravel project i have got this project from someone all things are working perfectly but something i want to get from database and i dont know how can i do it i just want to get start_date and end_date from database before function please help me.Thanks. please see the situation https://i.stack.imgur.com/JFhhI.jpg
https://imgur.com/xWVvTm2
$categories = subscriptions::select('start_date', 'end_date')
->where('business_id', '=', '$business_id')
->get();
if($categories=="")
{
$dbvalue['start_date'] = '';
dd($dbvalue);
}
else{
$gateways['start_date'] = '';
dd($dbvalue);
}
Hi if you wanna first record
->where('business_id', '=', '$business_id')
useand
but if you wanna get array use this
but you should sort this query then you can access to this data use foreach loop