From e22e8e9d09dc355070a1d8c09b0b5b1d543d0542 Mon Sep 17 00:00:00 2001 From: Arjan Weurding Date: Mon, 13 Feb 2023 14:38:46 +0100 Subject: [PATCH] Change Builder implementation to interface Scopes require the Contract in my opinion, because of when you call a scope from a relation directly. Example: ```$model->relation()->active();``` will return an error as the active() is called on the Relation class instead of the Eloquent Builder, which is not extended. --- .../plugins/laravel/hammer/services/IlluminateService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/net/rentalhost/plugins/laravel/hammer/services/IlluminateService.kt b/src/main/kotlin/net/rentalhost/plugins/laravel/hammer/services/IlluminateService.kt index 5c47914..6f24e2b 100644 --- a/src/main/kotlin/net/rentalhost/plugins/laravel/hammer/services/IlluminateService.kt +++ b/src/main/kotlin/net/rentalhost/plugins/laravel/hammer/services/IlluminateService.kt @@ -10,7 +10,7 @@ object IlluminateService { } object Builder { - const val name: String = "\\Illuminate\\Database\\Eloquent\\Builder" + const val name: String = "\\Illuminate\\Contracts\\Database\\Eloquent\\Builder" } } }