diff --git a/app/Http/Controllers/Admin/CompanyAreaController.php b/app/Http/Controllers/Admin/CompanyAreaController.php index 5e2f5a5..6a13b01 100644 --- a/app/Http/Controllers/Admin/CompanyAreaController.php +++ b/app/Http/Controllers/Admin/CompanyAreaController.php @@ -88,7 +88,8 @@ class CompanyAreaController extends Controller ->withErrors($validator); } else { $params = $request->all(); - $contact->update($params); + $company = Contact::find(1); + $company->update($params); return redirect()->route('admin.company.show', ['company' => 1]); } } diff --git a/app/Models/Contact.php b/app/Models/Contact.php index c843206..39110f5 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -8,4 +8,10 @@ use Illuminate\Database\Eloquent\Model; class Contact extends Model { use HasFactory; + + protected $fillable = ['email', 'telephone', 'title', 'title_t', 'description', + 'whatapp', 'telegram', 'title1', 'title2', 'title3', 'text1', 'text2', 'text3', + 'year', 'conf' + ]; + }