Internal Server Error Illuminate\Database\Eloquent\MassAssignmentException Add [name] to fillable property to allow mass assignment on [App\Models\User]. in Laravel 11
SOLUTION :
IN app\Models\User File, add below code to solve above Error
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
public $timestamps = false;
// protected $guarded = []; //we can write $guarded OR $fillable variable
protected $fillable = ["name","email","age","city"];
}
.png)
.png)
.png)
.png)
Comments
Post a Comment