diff --git a/app/Http/Requests/GoCardless/OAuthConnectRequest.php b/app/Http/Requests/GoCardless/OAuthConnectRequest.php new file mode 100644 index 0000000000..32b746621a --- /dev/null +++ b/app/Http/Requests/GoCardless/OAuthConnectRequest.php @@ -0,0 +1,46 @@ +|string> + */ + public function rules(): array + { + return [ + // + ]; + } + + public function getCompany(): \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Builder|\App\Models\BaseModel + { + MultiDB::findAndSetDbByCompanyKey( + $this->company_key, + ); + + return Company::query() + ->where('company_key', $this->company_key) + ->firstOrFail(); + } +}