R
R
RaDir2019-10-17 17:28:32
Laravel
RaDir, 2019-10-17 17:28:32

How to override/disable a route or service provider in Laravel?

Hello!
How to override the routes or service providers that come with the standard larka installation?
The idea is not to touch what was set by the framework - neither configs nor service providers. Extend the base installation only through packages that are included by the composer.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RaDir, 2019-10-17
@RaDir

In general, I figured it out:
1) $this->loadRoutesFrom(...) does not override routes, why I don’t know, I need to figure it out.
2) Redefinition works as follows. In the package, in the initializing provider in the boot method, it is necessary to register the RouteServiceProvider, in which to define the files of the routes.
3) The service provider cannot be overridden or banned - and this is superfluous.
The problem is solved - packages can only be chained through the composer, without affecting the base application. And thanks for the replies. Peace for everyone!

K
Kirill Nesmeyanov, 2019-10-17
@SerafimArts

How to override the routes or service providers that come with the standard larka installation?

https://laravel.com/docs/5.8/providers#registering...
All providers are in configs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question