How to create Facade in Laravel ?

Answer Posted / suresh kumar

The following are the steps to create Facade in Laravel -

Step 1 - Create PHP Class File.

Step 2 - Bind that class to Service Provider.

Step 3 - Register that ServiceProvider to

Configapp.php as providers.

Step 4 - Create Class which is this class extends to

lluminateSupportFacadesFacade.

Step 5 - Register point 4 to Configapp.php as aliases.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to configure route cache in laravel?

613


What are the Steps for Creating a Blade Template Layout ?

904


What is seeding in laravel?

540


What is the boot method?

588


What is queues?

552


Explain to listeners.

544


What is vagrantfile?

541


How to retrive all requested data in laravel?

561


Explain the service container?

511


What are view composers?

471


Explain how to install installing mariadb on homestead?

538


What is meant by check method ?

1238


How do I register a service provider?

488


What is asset in laravel?

564


List out some artisan commands?

510