second commit - test

This commit is contained in:
Sándor Máté Magony
2025-03-22 19:17:18 +01:00
parent 3e7f44edfe
commit 8fb5e07573
64 changed files with 10659 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}

View File

@@ -0,0 +1,25 @@
<?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);
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class WcAdatok extends Model
{
use HasFactory;
protected $table = 'wc_adatok';
protected $fillable = [
'nev', 'kerulet', 'kozeli_megall', 'akadalym', 'ar', 'nyitva', 'hossz_koord', 'szel_koord', 'utvonal'
];
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}