Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what are Important Points contracts in Laravel ?



what are Important Points contracts in Laravel ?..

Answer / nafees ahmad

While working with Laravel contracts, please note the following important points -

It is mandatory to define facades in the constructor of a class.

Contracts are explicitly defined in the classes and you need not define the contracts in constructors.

The contract uses a function can which includes a parameter named ability and arguments which uses the user identification in the form of an array.

You will have to define a contract as shown in the syntax below -

interface <contract-name>

Contracts are used like facades for creating robust, well-tested Laravel applications. There are various practical differences with usage of contracts and facades.
Contract contains no implementation and new dependencies;
It is easy to write an alternative implementation of a specified contract, thus a user can replace cache implementation without modifying any code base.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What are the validations in laravel?

0 Answers  


Explain how to create custom middleware in laravel?

0 Answers  


What is backend framework?

0 Answers  


What are the Forms in Laravel ?

0 Answers  


What is an observer?

0 Answers  


In laravel, what is fillable attribute in a model?

0 Answers  


What is laravel service container?

0 Answers  


Does laravel prevent sql injection?

0 Answers  


What is chunk in laravel?

0 Answers  


How to pass csrf token with ajax request?

0 Answers  


Describe laravel service provider?

0 Answers  


What do you maen by method spoofing in laravel 5?

0 Answers  


Categories