Flatten class for laravel 4