I want to check the requested values ββfrom a controller action this way:
// validate the info, create rules for the inputs $rules = array( 'username' => 'required|min:5|unique:users,username', 'email' => 'required|email|unique:users,email', 'password' => 'required|min:8', ); // run the validation rules on the inputs from the form $validator = Validator::make(Input::all(), $rules);
Everything is fine if I use the default database, but for this check I need to check the tables in another database. In config, I have two databases:
'connections' => array( 'main' => array( 'driver' => 'mysql', 'host' => '*******', 'database' => '*******', 'username' => '*******', 'password' => '*******', 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => 'ko_', ), 'server_auth' => array( 'driver' => 'mysql', 'host' => '*******', 'database' => '*******', 'username' => '*******', 'password' => '*******', 'charset' => 'utf8', 'collation' => 'utf8_general_ci', 'prefix' => '', ), ),
When I call Validation, it checks the "unique" rule in my database by default, so I need to change it, but I can not find anything to do it.