eloquent model insert or update code example
Example 1: laravel fillable
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'title',
'slug',
'body',
'image',
'published',
'comments_open'
];
Example 2: create or update laravel
DB::table('vendor_managements')->where('vendor_code', $vendor_code)->update(array('state'=> $state_namne));