lundi 27 avril 2020

record specific data to table with 30minute time interval using laravel

I created two tables,which are rainfall and status_msgs.i want to put record to rainfall table from status_msgs table.now i created a code which can give 10 records of specific UNIT_ID.(UNIT_ID is column of my status_msgs table)UNIT_ ID is A01.now i want that A01 data's record to rainfall table with 30minute time interval.i get data to a variable shown below.and i creadted a model called Statusmsg.

$datas = Statusmsg::where('UNIT_ID', '=', 'A01')->take(10)->get(); foreach ($datas as $data) {

}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire