I am facing an issue to assign across cross-databases relationship in laravel migration because my database name contains a dot(.) value, My Database name is = "demo.local.com"
Schema::table('user_details', function(Blueprint $table)
{
$table->foreign('user_id')->references('id')
->on('`demo.local.com`.users')
->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
I am using that way but its return error like
MariaDB server version for the right syntax to use near '.`com```.`users` (`id`) on delete RESTRICT on update RESTRICT
So it's possible to assign a foreign key when the database name contains a dot(.) value?