2.1-2.4: install spatie/laravel-translatable, migrate to JSON, update models & controllers
Deploy Backend / deploy (push) Failing after 1m52s
Deploy Backend / deploy (push) Failing after 1m52s
This commit is contained in:
1 parent
75af8220a7
commit
37dd2c9d54
17 files changed
+453
-285
No files matched your search
@@ -4,18 +4,16 @@ namespace App\Models\Website;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Translatable\HasTranslations;
|
||||
|
||||
class Project extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasFactory, HasTranslations;
|
||||
|
||||
protected $table = 'website_projects'; // نام صحیح جدول
|
||||
protected $table = 'website_projects';
|
||||
protected $fillable = ['category_id', 'image1', 'image2'];
|
||||
|
||||
public function translations()
|
||||
{
|
||||
return $this->hasMany(ProjectTranslation::class, 'project_id');
|
||||
}
|
||||
protected array $translatable = ['title', 'description'];
|
||||
|
||||
public function category()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user