diff --git a/skolehjem/app/Contact.php b/skolehjem/app/Contact.php index 5570122..74d306b 100644 --- a/skolehjem/app/Contact.php +++ b/skolehjem/app/Contact.php @@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model; class Contact extends Model { protected $fillable = [ - 'monday', "tuesday", 'wednesday', 'thursday', "friday", "saturday", "sunday" + 'name_first', "name_last", 'email', 'tel' ]; } diff --git a/skolehjem/app/Http/Controllers/ContactController.php b/skolehjem/app/Http/Controllers/ContactController.php index 5da67c6..c899c69 100644 --- a/skolehjem/app/Http/Controllers/ContactController.php +++ b/skolehjem/app/Http/Controllers/ContactController.php @@ -28,7 +28,7 @@ class ContactController extends Controller */ public function create() { - return Response::detect("contacts.create"); + return Response::detect("contact.create"); } @@ -41,8 +41,10 @@ class ContactController extends Controller public function store(Request $request) { $requestContact = $request->validate([ - "idk kev" => "required|max:255", - + "name_first" => "required|max:255", + "name_last" => "required|max:255", + "email" => "required|max:255", + "tel" => "required|max:255", ]); $contact = new MenuPlan($requestContact);