I want the insert option in laravel to return an attribute called 'orderid' after it inserts the data in to database.I have come across the insertGetId feature which returns the id of the inserted row, but i donot have an in the table ,instead i have a attribute called 'orderid' .
$id = DB::table('orders')->insertGetId( $data );
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire