Support the ongoing development of Laravel.io →
Eloquent Validation Architecture

Hi everyone,

http://laravel.io/bin/kYVa9

In the above snippet, you may recoil in horror when you see how bad my spaghetti code is, however I was hoping someone here may be able to provide a few pointers on how to reduce/tidy it up.

What I'm trying to do is essentially manage pages with translations. Each page can have a number of translations, but all must have an English version. When adding a translation, it simply adds another set of inputs, with the locale of the language as the key, i.e. title[fr], content[fr].

Does anyone have any suggestions on how I could clean up the code? Am I over complicating things by how I'm doing them?

Thanks

Gav

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

gRoberts84 groberts84 Joined 29 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.