I have one table where i need to fetch all records along with one custom field too i.e
SELECT
name,
code_no,
'0001' as batch_id // this is cutome field
FROM
mytable //batch_id is cutom filed
i tried
MyTable::select('name','code_no','00101 as batch_id')->get();
Any ideas please??