From 5a1d37d0d2ae432253c9f1c90a1a0fe238b9202e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Wed, 24 Jan 2024 18:00:54 +0100 Subject: [PATCH] rework stub --- stubs/UserResource.stub | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/stubs/UserResource.stub b/stubs/UserResource.stub index 83496037..c5d1c009 100644 --- a/stubs/UserResource.stub +++ b/stubs/UserResource.stub @@ -5,6 +5,7 @@ namespace App\Root\Resources; use Cone\Root\Fields\Email; use Cone\Root\Fields\ID; use Cone\Root\Fields\Text; +use Cone\Root\Models\User; use Cone\Root\Resources\Resource; use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Request; @@ -12,11 +13,24 @@ use Illuminate\Validation\Rule; class UserResource extends Resource { + /** + * The model class. + */ + protected string $model = User::class; + /** * The icon for the resource. */ protected string $icon = 'users'; + /** + * Get the model for the resource. + */ + public function getModel(): string + { + return User::getProxiedClass(); + } + /** * Define the fields. */