I am getting Error "MassAssignmentException in Model.php line 448: _token" When I am using create method please review code below
Contacts.php **(Model)**
class Contacts extends Model
{
protected $table = ['name', 'mobile', 'email', 'address', 'created_at', 'updated_at'];
}
ContactsController.php **(Controller)**
public function store(Request $request)
{
$inputs = $request->all();
$contacts = Contacts::Create($inputs);
return redirect()->route('contacts.index');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire