added things
This commit is contained in:
18
20250130/13ingatlan/app/Models/ingatlan.php
Normal file
18
20250130/13ingatlan/app/Models/ingatlan.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ingatlan extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = ['kategoria', 'leiras', 'hirdetesDatuma', 'tehermentes', 'ar', 'kepUrl'];
|
||||
|
||||
protected $table = "ingatlanok";
|
||||
|
||||
public function kategoria(){
|
||||
return $this->belongsTo(kategoria::class,
|
||||
'kategoria');
|
||||
}
|
||||
}
|
||||
19
20250130/13ingatlan/app/Models/kategoria.php
Normal file
19
20250130/13ingatlan/app/Models/kategoria.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
||||
class kategoria extends Model
|
||||
{
|
||||
//
|
||||
protected $fillable = ['nev'];
|
||||
|
||||
protected $table = "kategoriak";
|
||||
|
||||
public function ingatlanok(){
|
||||
return $this->hasMany(ingatlan::class,
|
||||
"kategoria");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user