Saturday, April 1, 2017

Laravel 5: best way to modify column name in model

What is the best way to modify column name before retrieve data from the model, ex: change id to be uid

$data = user::all(); //return array('uid'=>1,'uid'=>2 ... etc)

thanks,



via mwafi

Advertisement