Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
peripherad
/
back
/
app
/
BaseClasses
:
ArticleGroup.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php declare(strict_types=1); namespace App\Models; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Carbon; /** * @property int $id * @property int $model_id * @property string $name * @property string $article_type * @property Carbon|null $created_at * @property Carbon|null $updated_at * @property-read Collection|Article[] $articles * @property-read int|null $articles_count */ class ArticleGroup extends Model { protected $fillable = ['name', 'model_id', 'article_type', 'sort']; public function articles(): HasMany { return $this->hasMany(Article::class, 'article_group_id'); } public static function example(): array { return [ 'id' => 1, 'model_id' => 1, 'name' => 'Test' ]; } }