Migrate backend to Porto architecture and fix minor bugs
- Fully transitioned the backend to the Porto architectural pattern - Improved code organization and maintainability - Fixed minor bugs and inconsistencies
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Containers\Science\Models;
|
||||
|
||||
use App\Ship\Contracts\SeoDescriptionInterface;
|
||||
use App\Ship\Models\Model;
|
||||
use App\Ship\Traits\HasSeo;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class AcademicJournal extends Model implements SeoDescriptionInterface
|
||||
{
|
||||
use HasFactory, HasSeo;
|
||||
|
||||
protected $guarded = false;
|
||||
|
||||
protected $casts = [
|
||||
'main_info' => 'array',
|
||||
'chief_editor' => 'array',
|
||||
'editors' => 'array',
|
||||
'for_authors' => 'array',
|
||||
];
|
||||
|
||||
public function journals(): HasMany
|
||||
{
|
||||
return $this->hasMany(JournalIssue::class);
|
||||
}
|
||||
|
||||
public function getSeoDescription(): array
|
||||
{
|
||||
return $this->main_info;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user