Model::findOrFail returns a model object not a query builder object. You can pass the columns you want as the second parameter.
public static function findOrFail($id, $columns = array('*'))
Try something like this:
MemberInfo::findOrFail(Session::get('key'), array('uniquecode', 'name', 'rhq', 'zone', 'chapter', 'district', 'nric'))->toArray();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community