Moving DB queries to Eloquent

Made Categories Global