added things
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\ingatlan;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class IngatlanController extends Controller
|
||||
{
|
||||
//
|
||||
|
||||
public function index(){
|
||||
$ingatlanlista = ingatlan::with('kategoria.nev')->get();
|
||||
|
||||
return response()->json($ingatlanlista->map(function($ingatlan){
|
||||
return [
|
||||
'id' => $ingatlan->id,
|
||||
'kategoria' => $ingatlan->kategoria->nev,
|
||||
'leiras' => $ingatlan->leiras,
|
||||
'hirdetesDatuma' => $ingatlan->hirdetesDatuma,
|
||||
'tehermentes' => $ingatlan->tehermentes,
|
||||
'ar' => $ingatlan->ar,
|
||||
'kepUrl' => $ingatlan->kepUrl
|
||||
];
|
||||
}), 200);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user