Skip to content
Advertisement

Can’t get a list of streets to create a card [closed]

JavaScript

I can’t fill out the card at home when creating. The list of streets appears, but when you select a street, and further fill in all the fields, the page is simply refreshed without entering the data into the database. Where I made a mistake in the code, please tell me!

UPD: Now I can not go to the page in the admin panel with a list of houses, writes

JavaScript

The error is highlighted on this line (this is where you get the street and house number).

JavaScript

created.blade.php

JavaScript

Advertisement

Answer

You can validate the street in your store method, i’m assuming the table in the database is called streets and has a primary key id

JavaScript

Maybe street_id is not present in the attribute $fillable of your House model and it’s not set to '*'. Change the way you save the model

JavaScript

or set in Houses class

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement