Files
PeePal/Backend/peepal_backend/app/Http/Controllers/WcController.php
Sándor Máté Magony 8fb5e07573 second commit - test
2025-03-22 19:17:18 +01:00

26 lines
451 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\WcAdatok;
use Illuminate\Http\Request;
class WcController extends Controller
{
public function index()
{
return response()->json(WcAdatok::all());
}
public function show($id)
{
$wc = WcAdatok::find($id);
if (!$wc) {
return response()->json(['message' => 'Nem található'], 404);
}
return response()->json($wc);
}
}