Explain Extending Bindings in Laravel?

0 votes
I'm having a site deployed in a web host. so now the problem is how can i modify to that closure in laravel?

Thank you!
Mar 26 in Laravel by kartik
• 4,560 points
20 views

1 answer to this question.

0 votes

Hii,

 The extend method allows the modification of resolved services

For example, when a service is resolved, you may run additional code to decorate or configure the service. The extend method accepts a Closure, which should return the modified service, as its only argument:

$this->app->extend(Service::class, function($service) {
return new DecoratedService($service);
});

The above code will help you to modify the already resolved services.

Thank you!

answered Mar 26 by Niroj
• 8,620 points

Related Questions In Laravel

0 votes
1 answer

How to validate my application incoming data? Explain validations in laravel?

Hey @kartik, In Programming validations are a handy ...READ MORE

answered Mar 23 in Laravel by Niroj
• 8,620 points
30 views
0 votes
1 answer

Explain Guarded Attribute in a Laravel model?

Hii, The guarded attribute is the opposite of ...READ MORE

answered Mar 27 in Laravel by Niroj
• 8,620 points
30 views
0 votes
1 answer

Display Laravel in browser by using cmd promt?

Hello, First you need to have laravel install ...READ MORE

answered Mar 17 in Laravel by Niroj
• 8,620 points
19 views
0 votes
1 answer

What are the important directories used in a common Laravel application

Hey @Kartik. Directories used in a common Laravel ...READ MORE

answered Mar 17 in Laravel by Niroj
• 8,620 points
20 views
0 votes
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18 in Laravel by Niroj
• 8,620 points
45 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18 in Laravel by Niroj
• 8,620 points
22 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23 in Laravel by Niroj
• 8,620 points
29 views
0 votes
1 answer

What are named routes in Laravel?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23 in Laravel by Niroj
• 8,620 points
21 views
0 votes
1 answer

Explain the concept of encryption and decryption in Laravel?

It is a process of transforming any ...READ MORE

answered Mar 17 in Laravel by Niroj
• 8,620 points
22 views
0 votes
1 answer

Explain make Method in Laravel?

Hey, You may use the make method to ...READ MORE

answered Mar 19 in Laravel by Niroj
• 8,620 points
26 views