Header Ads

header image

Laravel Technical Question p01

 

Technical Question


  1.  What is artisan?

Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application

      2. What is composer?

Composer is an open source dependency management tool for PHP, created primarily to facilitate the distribution and maintenance of PHP packages as individual application components.

      3. Database Transaction?

You may use the transaction method provided by the DB facade to run a set of operations within a database transaction. If an exception is thrown within the transaction closure, the transaction will automatically be rolled back and the exception is re-thrown. If the closure executes successfully, the transaction will automatically be committed.
Example: let's say you take in an expense input and once the expense gets into table B, the account in table A got updated. Now there is a scenario where table B gets updated but A did not. Now one has to manually put the changes. But if DB Transaction were used this will never occur. 

    4. Difference between {{ }} and {{ !! !! }} in laravel 
If you pass data from your Controller to a View with some HTML styling And it is accessed, within Blade. With {{ }}  the html doesn’t work, but {{!! !!}} the html styling woks accordingly 

    5. which template engine is used in laravel? 
Blade

    6. what is eager loading 
Eager Loading means you get all of the required data at the same time. In contrast, Lazy Loading only retrieves related things when they are actually needed and only gives you one item at a time. 
Eager loading is a concept in which when retrieving items, you get all the needed items together with all (or most) related items at the same time.

    7. Route file type
POST - Create NEW record
PUT - If the record exists, update else, create a new record
PATCH - update
GET - read
DELETE - delete 


1 comment:

BASIC CSS P01

        BASIC CSS  Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ducimus quia ad, magni eius voluptatibus qui blanditiis nulla v...

Theme images by enot-poloskun. Powered by Blogger.