Im using laravel and trying to figure out how run this query with fluent / eloquent (laravel)
select email, SUBSTRING_INDEX(email,'@',-1) AS domain from epost order by domain desc;
My goal is to get the sorting by the domain namn rather than just sorting from the beginning of the string.
return Email::order_by('email', 'desc');
Please help.
I got it to work now using this string