Are you trying to create a multi-tenanted application?
Functionally doing what you ask is pretty simple, but I'm not sure you actually want to do this as what you're asking for is to create a pre-defined set of routes for every company_name, which is just going to duplicate the entire routes file across however many companies in your database (which means that the routes can't be cached etc...)
I think what you instead want, is for all routes to require a company_name as a wildcard which then triggers a tenant to be loaded for that request?
You'd do that like this:
Route::group([
'prefix' => '/{tenant}',
'middleware' => \App\Http\Middleware\IdentifyTenant::class,
'as' => 'tenant:',
], function () {
// Tenant routes here
});
Taken from https://ollieread.com/articles/laravel-multi-tenancy-avoiding-over-engineering which I've used to implement multi-tenancy on an application previously