DEV Community

Toqeer Abbas
Toqeer Abbas

Posted on

 

Tip for increment and decrement any column in laravel.

Hi everyone,
Today i will tell you about a tip to increment and decrement any column in Laravel.

$user::find(1)->increment('likes');
$user::find(1)->decrement('likes');

you can use it anywhere where you want.

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git