Answers for "laravel query builder update or create"

PHP
2

laravel where update query

DB::table('users')
        ->where('id', $id)
        ->update([
            'status'     => 1
        ]);
Posted by: Guest on August-25-2021
2

query builder laravel

use IlluminateDatabaseEloquentBuilder;

public function scopeFakePersons(Builder $query): Builder
{
  return $query->where('is_fake', 1);
}
Posted by: Guest on January-20-2021

Code answers related to "laravel query builder update or create"

Browse Popular Code Answers by Language