updated for eloquent