Thank you for the response.
I partially understand the problem (10%), but what I don't understand is why this problem appears now. It has worked all the time.
(I literally didn't change anything to the code, except for the update)
I read the docs you send of Laravel but I can figure out how to use it in practice.
Below is how my model looks like from Aircraft.php. The error also called that he requests a user_id, but the model aircraft has no relation with Aircraft.
namespace App;
use Illuminate\Database\Eloquent\Model;
class Aircraft extends Model
{
public $table = "aircraft";
public function operator()
{
// Makes relation with a operator that's the aircraft from.
return $this->belongsTo(Operator::class);
}
public function manufacturer()
{
// Relation with the builder of the aircraft, Boeing or Airbus...
return $this->belongsTo(Manufacturer::class);
}
public function postAircraft()
{
// Relation with uploaded pictures regarding the aircraft.
return $this->hasMany(PostAircraft::class);
}
}
I also tried to declare in the User model aircrafts, the error disappeared but the result was that I cant create users. What I believe makes sense because It goes to the aircrafts table, instead of users.
Hopefully, you can help me and if you need some more examples let me know.