first commit

This commit is contained in:
2025-03-27 12:25:27 +00:00
commit 25428dbd31
261 changed files with 23580 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Organisation extends Model
{
protected $guarded = [];
public function owner(): BelongsTo
{
return $this->belongsTo(User::class, 'owner_id');
}
public function members(): BelongsToMany
{
return $this->belongsToMany(User::class)
->withPivot('role')
->as('membership')
->using(OrganisationUser::class)
->withTimestamps();
}
public function applications(): HasMany
{
return $this->hasMany(Application::class);
}
}