Support the ongoing development of Laravel.io →
IOC Forms Validation

Has anyone tips for organizing service provider class files? Then in turn, thin out the service provider injection class?

For instance I have a form service provider that injections validation service into them:

$app->bind('Namespace\Service\Form\Client\ClientForm', function($app)
    {
        return new ClientForm(
            new ClientFormLaravelValidator( $app['validator'] ),
            $app->make('Namespace\Repo\Client\ClientInterface')
        );
    });

The bloat comes from about 15 or so forms. Looking for some guidance on better organization.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.