Update Dashboard Survey Petani

This commit is contained in:
2026-07-14 10:34:46 +07:00
parent 5b776b2ae8
commit e383aacbeb
8 changed files with 1244 additions and 4 deletions
+8
View File
@@ -9,8 +9,11 @@ use App\Enums\Role;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Laravel\Sanctum\HasApiTokens;
use App\Models\Pertanian\Petani;
class User extends Authenticatable
{
use HasFactory, Notifiable, HasApiTokens, SoftDeletes;
@@ -44,4 +47,9 @@ class User extends Authenticatable
{
return $this->hasOne(\App\Models\Profile::class);
}
public function petaniDibuat(): HasMany
{
return $this->hasMany(Petani::class, 'created_by');
}
}