Engineering notes

Ideas worth building on.

Practical lessons, technical explorations and the decisions behind better software.

17 articles

Laravel2 min read

What are accessors and mutators in laravel?

Accessors are a way to retrieve data from eloquent after doing some operation on the retrieved fields from the database. For example, if we need to combine the first and last names...

Kartic · Dec 22, 2022
Laravel1 min read

What is Eloquent in Laravel?

Eloquent is the ORM used to interact with the database using Model classes. It gives handy methods on class objects to make a query on the database. It can directly be used to ret...

Kartic · Dec 22, 2022
Laravel1 min read

Explain Closures in laravel?

In Laravel, a closure is an anonymous function that often used as callback methods. Developers can also use it as a parameter in a function. Example: In Laravel, a closure is an an...

Kartic · Oct 24, 2019
Laravel1 min read

Session and Cookies in laravel

Session1. Retrieving Data from sessionsession()->get('key');2. Retrieving All session datasession()->all();3. Remove data from sessionsession()->forget('key'); or session()->flush(...

Kartic · Oct 24, 2019
Laravel1 min read

What is service providers in Laravel?

In Laravel, service providers are the center of overall Laravel application bootstrapping. User applications, as well as core services of Laravel, are bootstrapped with service pro...

Kartic · Oct 24, 2019
Laravel1 min read

Is Laravel support caching? Explain

Yes, It supports caching like Memcached and Redis. By default, laravel is configured with file cache which is stores the serialized, cached objects in the files. Normally we can us...

Kartic · Oct 24, 2019
Laravel1 min read

Use updateOrInsert() in Laravel Query?

updateOrInsert() method is used to update an existing record in the database if matching the condition or create if no matching record exists.Its return type is Boolean.SyntaxDB::t...

Kartic · Oct 24, 2019
Laravel1 min read

What is Queue ? Advantages of Queue?

Queues in Laravel are used by developers to create smooth application cycle by stacking complex tasks as jobs and dispatching these heavy jobs only with user permission or when it...

Kartic · Oct 24, 2019
Laravel1 min read

What is Dependency injection in Laravel?

In Laravel, dependency injection is a term used for the activity of injecting components into the user application. It’s a key element of agile architecture. The Laravel service co...

Kartic · Oct 24, 2019
Laravel1 min read

What is Eloquent ORM in Laravel?

The Eloquent ORM present in Laravel offers a simple yet beautiful ActiveRecord implementation to work with the database. Here, each database table offers a corresponding model whic...

Kartic · Oct 24, 2019
Laravel1 min read

How to enable query log in laravel?

Our first step should be DB::connection()->enableQueryLog(); After our query it should be placed $querieslog = DB::getQueryLog(); After that it shou;ld be placed dd($querieslog) A...

Kartic · Oct 24, 2019
Laravel1 min read

How to enable query log in laravel?

Our first step should be DB::connection()->enableQueryLog(); After our query it should be placed $querieslog = DB::getQueryLog(); After that it shou;ld be placed dd($querieslog) A...

Kartic · Oct 24, 2019