What are Laravel Facades?

0 votes
What interface to classes that are available in the application's service container.
Mar 17 in Laravel by kartik
• 27,360 points
71 views

1 answer to this question.

0 votes

Facades provide a "static" interface to classes that are available in the application's service container.

All of Laravel's facades are defined in the Illuminate\Support\Facades namespace.

Facades have many benefits. They provide a short and memorable syntax that allows you to use Laravel's features without remembering long class names that must be injected or configured manually.

Facades Vs Helper Functions: There is absolutely no practical difference between facades and helper functions. Many of these helper functions perform the same function as a corresponding facade. For example, this facade call and helper call are equivalent:

  1. return View::make('welcome'); // facade call
  2. return view('welcome'); // helper call
answered Mar 17 by Niroj
• 58,960 points

Related Questions In Laravel

0 votes
1 answer

Does Laravel support caching and what are the Cache Usage?

Hey, Yes, Laravel provides support for popular caching ...READ MORE

answered Mar 20 in Laravel by Niroj
• 58,960 points
127 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

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

answered Mar 23 in Laravel by Niroj
• 58,960 points
2,759 views
0 votes
1 answer

What are traits in Laravel?

Hii, PHP Traits are simply a group of methods ...READ MORE

answered Mar 23 in Laravel by Niroj
• 58,960 points
72 views
0 votes
1 answer

What is the difference between Facades and Dependency Injection in Laravel?

Hello, The main differnece between them is explained ...READ MORE

answered Mar 26 in Laravel by Niroj
• 58,960 points
384 views
0 votes
1 answer

How to download and install Lavavel framework?

Hey @kartik, First you must have xampp install ...READ MORE

answered Mar 17 in Laravel by Niroj
• 58,960 points
172 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
• 58,960 points
67 views
0 votes
1 answer

How can we get started with Laravel through Xampp?

Hii, First you need to start Apache and ...READ MORE

answered Mar 17 in Laravel by Niroj
• 58,960 points
74 views
0 votes
1 answer

How to change Laravel official name to any customize name?

Hey, You just need to go Laravel folder through ...READ MORE

answered Mar 17 in Laravel by Niroj
• 58,960 points
81 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
• 58,960 points
97 views
0 votes
1 answer

What are the query builder in Laravel?

Hey, Laravel's database query builder provides a convenient, ...READ MORE

answered Mar 19 in Laravel by Niroj
• 58,960 points
91 views