I'm doing a query using Query Builder
$users = DB::select( DB::raw("
SELECT users.* from users, permissions_customers WHERE
permissions_customers.customer_id in
(
SELECT permissions_customers.customer_id from
permissions_customers
WHERE
permissions_customers.user_id = ?
)
AND
permissions_customers.user_id = users.id
GROUP BY users.id
"), array(5));
As you can see in T-SQL the return is a result of the users table, but it returns an array of objects of type stdClass, I would like these results to be a list (Collection) of Eloquent Model for me to access its relationship methods, I was able to loop in the results and put them in a Collection but but when I try to create an Eloquent Model Object from my stdClass object, the Eloquent model does not seem to work as it should I can not do queries on the methods