Instead of having
posts, posts_translations,
articles, articles_translations,
etc..
can I have
articles, posts,
and translations, something like this
Schema::create('translations', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string("translatable_type");
$table->unsignedBigInteger("translatable_id");
$table->string('column', 70);
$table->string('locale', 5);
$table->text('value');
$table->timestamps();
$table->unique([
'translatable_type',
'translatable_id',
'column',
'locale',
], 'translations_u_type_id_column_locale');
});
Instead of having
posts, posts_translations,
articles, articles_translations,
etc..
can I have
articles, posts,
and translations, something like this