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...
Engineering notes
17 articles
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...
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...
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...
Session1. Retrieving Data from sessionsession()->get('key');2. Retrieving All session datasession()->all();3. Remove data from sessionsession()->forget('key'); or session()->flush(...
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...
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...
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...
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...
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...
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...
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...
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...