Működik a form a módosított adatbázissal

This commit is contained in:
Sándor Máté Magony
2025-04-14 19:11:29 +02:00
parent 03b81b65e5
commit 544a59b92e
4 changed files with 50 additions and 21 deletions

View File

@@ -56,7 +56,7 @@ class WcController extends Controller
'utvonal' => $validatedData['utvonal'],
'szel_koord' => $szelesseg,
'hossz_koord' => $hosszusag,
'felhasznalo_id' => $validatedData['felhasznalo_id']
'felhasznalo_id' => $validatedData['felhasznalo_id'] ?? null
]);
return response()->json([

View File

@@ -13,6 +13,10 @@ class WcAdatok extends Model
return $this->belongsTo(Keruletek::class);
}
public function felhasznalo(){
return $this->belongsTo(User::class);
}
protected $table = 'wc_adatok';
protected $fillable = [