BI
Size: a a a
BI
🎃
АК
🎃
EK
EK
EK
АК
S
AK
Schema::create('articles', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('image')->nullable();
$table->boolean('status')->default(true);
$table->timestamps();
});
Schema::create('article_descriptions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('language_id');
$table->foreign('language_id')->references('id')->on('languages');
$table->unsignedBigInteger('article_id');
$table->foreign('article_id')->references('id')->on('articles');
$table->unique(['article_id', 'language_id']);
$table->string('name', 255);
$table->text('description');
$table->string('meta_title', 255)->nullable();
$table->string('meta_description', 255)->nullable();
$table->timestamps();
});
public function descriptions() {
return $this->hasMany(ArticleDescription::class);
}
App::getLocale()
AO
DG
EK
D
D
EK
Schema::create('articles', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('image')->nullable();
$table->boolean('status')->default(true);
$table->timestamps();
});
Schema::create('article_descriptions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('language_id');
$table->foreign('language_id')->references('id')->on('languages');
$table->unsignedBigInteger('article_id');
$table->foreign('article_id')->references('id')->on('articles');
$table->unique(['article_id', 'language_id']);
$table->string('name', 255);
$table->text('description');
$table->string('meta_title', 255)->nullable();
$table->string('meta_description', 255)->nullable();
$table->timestamps();
});
public function descriptions() {
return $this->hasMany(ArticleDescription::class);
}
App::getLocale()
public function magic() {
return $this->hasMany(ArticleDescription::class)->where('language_id',
App::getLocale()
);like this
}
something
AK
public function magic() {
return $this->hasMany(ArticleDescription::class)->where('language_id',
App::getLocale()
);like this
}
something
EK