diff --git a/src/Attachment/Models/Attachment.php b/src/Attachment/Models/Attachment.php index cbb57d2b1c..35cf7640db 100644 --- a/src/Attachment/Models/Attachment.php +++ b/src/Attachment/Models/Attachment.php @@ -11,6 +11,8 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Support\Carbon; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; use Orchid\Attachment\MimeTypes; @@ -21,6 +23,29 @@ /** * Class Attachment. + * + * @property int $id; + * @property string $name + * @property string $original_name + * @property string $mime + * @property ?string $extension + * @property int $size + * @property int $sort + * @property int $path + * @property ?string $description + * @property ?string $alt + * @property ?string $hash + * @property string $disk + * @property ?int $user_id + * @property ?string $group + * @property ?Carbon $created_at + * @property ?Carbon $updated_at + * @property ?User $user + * @property null|Attachmentable[]|Collection $relationships + * @property-read ?string $url + * @property-read ?string $relative_url + * @property-read ?string $title + * */ class Attachment extends Model { diff --git a/src/Attachment/Models/Attachmentable.php b/src/Attachment/Models/Attachmentable.php index 662cb89a6b..17fc31af1d 100644 --- a/src/Attachment/Models/Attachmentable.php +++ b/src/Attachment/Models/Attachmentable.php @@ -8,6 +8,11 @@ /** * This class represents the relation between attachments and any model that can have them. + * + * @property string $attachmentable_type + * @property int $attachmentable_id + * @property int $attachment_id + * */ class Attachmentable extends Model { diff --git a/src/Platform/Models/Role.php b/src/Platform/Models/Role.php index 3d79df526b..362c1dc47b 100644 --- a/src/Platform/Models/Role.php +++ b/src/Platform/Models/Role.php @@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Collection; use Orchid\Access\RoleAccess; use Orchid\Access\RoleInterface; use Orchid\Filters\Filterable; @@ -14,6 +15,13 @@ use Orchid\Metrics\Chartable; use Orchid\Screen\AsSource; +/** + * @property int $id + * @property string $name + * @property string $slug + * @property ?array $permissions + * @property null|User[]|Collection $users + */ class Role extends Model implements RoleInterface { use RoleAccess, Filterable, AsSource, Chartable, HasFactory; diff --git a/src/Platform/Models/User.php b/src/Platform/Models/User.php index 88378dbee9..4aff15dee8 100644 --- a/src/Platform/Models/User.php +++ b/src/Platform/Models/User.php @@ -5,9 +5,12 @@ namespace Orchid\Platform\Models; use App\Orchid\Presenters\UserPresenter; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Illuminate\Support\Carbon; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Hash; use Orchid\Access\UserAccess; use Orchid\Access\UserInterface; @@ -19,6 +22,22 @@ use Orchid\Screen\AsSource; use Orchid\Support\Facades\Dashboard; +/** + * + * @property int $id + * @property string $name + * @property string $email + * @property ?Carbon $email_verified_at + * @property string $password + * @property ?string $remember_token + * @property ?Carbon $created_at + * @property ?Carbon $updated_at + * @property ?array $permissions + * @property null|Role[]|Collection $roles + * @method Builder byAccess(string $permitWithoutWildcard) + * @method Builder byAnyAccess(iterable|string $permitWithoutWildcard) + * + */ class User extends Authenticatable implements UserInterface { use Notifiable, UserAccess, AsSource, Filterable, Chartable, HasFactory;