you need to use Cat Model
while saving :
like $cat=new Cat();
for creating new record or,
$cat=Cat::find($id);
while updating exiting record
try{
$cat=new Cat();
$cat->some_column='some_value';
$abcd = $cat->save();
var_dump($abcd);exit; // returns true
} catch (Exception $e){
echo ''
;print_r($e);exit;
}
manpreet
Best Answer
2 years ago
Dumping the data just before save function is printing all correct.
Tried this code - it dumps as true but not getting updated in database. I have tried all known scenarios. Any exceptional cases that this can happen.?
primary key, id , .... and some other checks are already done. But no progress.