Answer the question
In order to leave comments, you need to log in
How to change external package in Laravel?
In general, there is an external package with an admin panel in which there is a Crud controller, it looks like this:
namespace Serverfireteam\Panel;
//use Illuminate\Routing\Controller; [remove this]
use App\Http\Controllers\Controller; [replace with this]
class CrudController extends Controller{
}
from CrudController inherit controllers from App/Http/Controllers.
In general, I only need to replace 1 line. How can this be done without pain? Well, or even how to copy the entire package to App/ and connect it? Laravel 5.2
Answer the question
In order to leave comments, you need to log in
In general, what you want to do is contrary to the open-closed principle (S O LID). He says that the code should be closed for modification and open for extension.
In this regard, the question: "Do you need it?". Think, maybe the problem can be solved by inheriting from this class?
Bad idea. As a result, all packages that this package depends on will need to be kept under the same version. For, if something changes after the dependency update, the admin package may stop working correctly. Yes, and it's inconvenient.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question