taktik - laravel

This commit is contained in:
2025-01-23 00:19:07 +01:00
commit 43b6cff880
127 changed files with 15025 additions and 0 deletions

32
app/Models/Category.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Models;
use Carbon\CarbonInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
* @property string $name
* @property CarbonInterface $created_at
* @property CarbonInterface $updated_at
*/
class Category extends Model
{
/** @use HasFactory<\Database\Factories\CategoryFactory> */
use HasFactory;
protected $fillable = ['name'];
/**
* @return HasMany<Post, $this>
*/
public function posts(): HasMany
{
return $this->hasMany(Post::class);
}
}