Edit Fields Not working; not updating, and sending empty array to backend #5122
-
|
I am using Laravel version 9.41 and Nova 4. I can delete records, however it appears that on the frontend/JavaScript side of things my form fields are not having their contents captured and sent back to the server. My action_events table shows [ ] empty arrays as what is being sent. I have spent a good four or five hours googling and checking that my Resources, field names etc. are all spelled correctly. I also see no error messages. Each time I get the green success message, "This has been updated!" or whatever. `The bounty expires in 6 days. Answers that other users post to this question are eligible for a +50 reputation bounty. WebDev-SysAdmin wants to draw more attention to this question. I have spent a good four or five hours googling and checking that my Resources, field names etc. are all spelled correctly. I also see no error messages. Each time I get the green success message, "This has been updated!" or whatever. use Illuminate\Http\Request; class Post extends Resource And here is my Model: `class Post extends Model } |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
class Post extends Model
{
use HasFactory;
public $id;
public $text;
public $created_at;
public $updated_at;
protected $fillable = [
'id',
'text',
'created_at',
'updated_at'
];
}There no reason to define the following property. It's not part of any Eloquent conversion and the root cause of your issue: public $id;
public $text;
public $created_at;
public $updated_at; |
Beta Was this translation helpful? Give feedback.
There no reason to define the following property. It's not part of any Eloquent conversion and the root cause of your issue: