How to mention the postgres schema in laravel request file

℡╲_俬逩灬. 提交于 2020-08-11 02:49:46

问题


I'm using Laravel 5.5 and I want to define a unique validation for a table column column_x located inside a Postgres schema schema_x, I've tried :

public function rules()
{
    return [
        'column_x' => 'required|unique:schema_x.table_x'
    ];
}

But the following error keeps raising :

SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "table_x" does not exist

I can't find any information about this case in the official documentation (Validation Section).

来源:https://stackoverflow.com/questions/51320804/how-to-mention-the-postgres-schema-in-laravel-request-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!