+1 vote
by
Here is the error report in frame 44, app/Http/Controllers/service/DB_controller.php

UsersDB.php model:
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class UsersDB extends Model
{
use SoftDeletes;
use HasFactory;

protected $dates = ['deleted_at'];
protected $table = 'users_d_b_s';
protected $guarded = ['id']; //<== Нет проблема не в этой строке, вроде...
}
Database: Structure: Gf5jw1I.png
Review:
wKV1MZx.png

Thank you!

2 Answers

0 votes
by
 
Best answer
where(['id' => '1'])
0 votes
by
UUhhhhh...

1) delete protected $dates, because use SoftDeletes and so assumes that the deleted_at field is a date.
2) UsersDB::withTrashed()->find($id)->restore();
3) Incorrect construction where
...