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 );
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Y63pdt
via IFTTT
Aucun commentaire:
Enregistrer un commentaire