问题
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