Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add model property types to magic where methods. #989

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
### Added
- Fix phpdoc generate for custom cast with parameter [\#986 / artelkr](https://github.com/barryvdh/laravel-ide-helper/pull/986)
- Created a possibility to add custom relation type [\#987 / efinder2](https://github.com/barryvdh/laravel-ide-helper/pull/987)
- Add model property types to magic where methods [\#989 / jpickwell](https://github.com/barryvdh/laravel-ide-helper/pull/989)
- Added `@see` with macro/mixin definition location to PhpDoc [\#1054 / riesjart](https://github.com/barryvdh/laravel-ide-helper/pull/1054)

### Changed
Expand Down
40 changes: 31 additions & 9 deletions src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ protected function getPropertiesFromTable($model)

$database = null;
if (strpos($table, '.')) {
list($database, $table) = explode('.', $table);
[$database, $table] = explode('.', $table);
}

$columns = $schema->listTableColumns($table, $database);
Expand Down Expand Up @@ -478,21 +478,35 @@ protected function getPropertiesFromTable($model)
if (!$column->getNotnull()) {
$this->nullableColumns[$name] = true;
}

$propertyType = $this->getTypeInModel($model, $type);
$nullable = !$column->getNotnull();

$this->setProperty(
$name,
$this->getTypeInModel($model, $type),
$propertyType,
true,
true,
$comment,
!$column->getNotnull()
$nullable
);

if ($this->write_model_magic_where) {
$truePropertyType = $this->getTruePropertyType(
$propertyType,
$nullable
);

$this->setMethod(
Str::camel('where_' . $name),
$this->getClassNameInDestinationFile($model, \Illuminate\Database\Eloquent\Builder::class)
. '|'
. $this->getClassNameInDestinationFile($model, get_class($model)),
['$value']
[
empty($truePropertyType)
? '$value'
: "$truePropertyType \$value",
]
);
}
}
Expand Down Expand Up @@ -711,11 +725,7 @@ protected function setProperty($name, $type = null, $read = null, $write = null,
$this->properties[$name]['comment'] = (string) $comment;
}
if ($type !== null) {
$newType = $this->getTypeOverride($type);
if ($nullable) {
$newType .= '|null';
}
$this->properties[$name]['type'] = $newType;
$this->properties[$name]['type'] = $this->getTruePropertyType($type, $nullable);
}
if ($read !== null) {
$this->properties[$name]['read'] = $read;
Expand All @@ -725,6 +735,18 @@ protected function setProperty($name, $type = null, $read = null, $write = null,
}
}

protected function getTruePropertyType(string $type, bool $nullable): string
{
/** @var string $trueType */
$trueType = $this->getTypeOverride($type);

if ($nullable) {
$trueType .= '|null';
}

return $trueType;
}

protected function setMethod($name, $type = '', $arguments = [])
{
$methods = array_change_key_case($this->methods, CASE_LOWER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @method static \Illuminate\Database\Eloquent\Builder|Simple newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Simple newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Simple query()
* @method static \Illuminate\Database\Eloquent\Builder|Simple whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Simple whereId(integer $value)
* @mixin \Eloquent
*/
class Simple extends Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate query()
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereCreatedAt(\Carbon\CarbonImmutable|null $value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mention this in my previous feedback but it might just have gotten lost: any method accepting Carbon (or a variation thereof) also accept strings, it doesn't just accept an instance (or null).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, but if you look at the created_at property, it's also \Carbon\CarbonImmutable|null, so this is not an issue with this new feature.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whereProperty method parameter type is now exactly the same as the corresponding @property.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, but if you look at the created_at property, it's also \Carbon\CarbonImmutable|null, so this is not an issue with this new feature.

The whereProperty method parameter type is now exactly the same as the corresponding @property.

I pointed this out in #989 (review)

Basically it assumes that the "cast output" is the sole allowed input for those magic methods.

However this assumption isn't correct.

Let's look at this tinker session:

$ ./artisan tinker
Psy Shell v0.10.4 (PHP 7.4.10 — cli) by Justin Hileman
>>> $user = App\Models\User;
=> App\Modes\User {#4302
   }
>>> $user->deleted_at;
=> null
>>> $user->deleted_at = '2020-10-10 12:12:00';
=> "2020-10-10 12:12:00"
>>> $user->deleted_at
=> Carbon\CarbonImmutable @1602331920 {#4301
     date: 2020-10-10 12:12:00.0 UTC (+00:00),
   }
>>> $user->deleted_at = \Carbon\CarbonImmutable::now();
=> Carbon\CarbonImmutable @1599856846 {#4319
     date: 2020-09-11 20:40:46.689963 UTC (+00:00),
   }
>>> $user->deleted_at
=> Carbon\CarbonImmutable @1599856846 {#4309
     date: 2020-09-11 20:40:46.0 UTC (+00:00),
   }

Setting either string or Carbon is fine.

However, in the IDE:
image


I noticed something else in a private project I tested this:

Migration:

            $table->jsonb('keywords')->nullable();

Model:

 * @property array|null $keywordsprotected $casts = [
        'keywords' => 'array',
    ];

Before:

 * @method static Builder|Automation whereKeywords($value)

After:

 * @method static Builder|Automation whereKeywords(string|null $value)

I think string is practical in this context, there's not much point about this anyway as it's a JSON column.


But then I've another model with a similar column which however generated this:

Migration:

            $table->json('some_other_column')->nullable();

Model:

 * @property array $some_other_column
…
 * @method static Builder|Attachment whereSomeOtherColumn(mixed|null $value)
…
    protected $casts = [
        'some_other_column' => 'array',
    ];
…
    public function setSomeOtherColumnAttribute(?array $value): self
    {
…    }

    public function getSomeOtherColumnAttribute(): array
    {
…    }

The mixed is in fact also not that bad here, actually might make even more sense.

Though I could not figure out why one is string here and one is mixed. I tried removing the set/get but it didn't change 🤷‍♀️


Whilst I'm not yet in the clear regarding the latter new examples, I think that date casts not accepting string is bad. The laravel-ide-helper is supposed to help but would get in the way here.

These were only easy examples with $date and array casts, but maybe properties in $casts have to be handled differently?

Copy link
Author

@jpickwell jpickwell Sep 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not disputing the string issue with dates. However, that's an existing issue in laravel-ide-helper. You have the same issue with setting the magic properties. I'm not going to fix this issue in this PR. That's outside the scope of the PR. If you want that fixed, then create an issue and maybe someone will create a PR to rectify the issue.

If you look at the CustomDate snapshot, you'll see that the @property tags and the corresponding where @method tags have the same value type:

<?php

declare(strict_types=1);

namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Models\CustomDate
 *
 * @property \Carbon\CarbonImmutable|null $created_at
 * @property \Carbon\CarbonImmutable|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate query()
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereCreatedAt(\Carbon\CarbonImmutable|null $value)
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereUpdatedAt(\Carbon\CarbonImmutable|null $value)
 * @mixin \Eloquent
 */
class CustomDate extends Model
{
}

The type for the $value parameter is exactly the same as the corresponding @property type. And, when I say "exactly the same", I mean that the string is calculated using the same helper method in the command class, see the following lines in the ModelsCommand.php file in this PR:

  • 482 -- getting the initial type for a property
  • 487 -- passing the type to the setProperty method
  • 495 -- getting the "true" type for the property for the where method by calling getTruePropertyType
  • 728 -- same method call, but for the property itself
  • 822 -- shows that no other type manipulation is performed when generating the PhpDoc @property tags

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to fix this issue in this PR. That's outside the scope of the PR. If you want that fixed, then create an issue and maybe someone will create a PR to rectify the issue.

That's a pretty strong feedback here, not sure where this is coming from.


It made me think though whether this whole feature should be optional (opt-in/out => debatable)

Copy link
Author

@jpickwell jpickwell Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the example of dates as \Carbon\CarbonImmutable and not allowing strings is an issue that already exists in the code base. I did not introduce this issue. If you look at the diffs for the test snapshots, you'll see that the @property tags did not change.

My objection to your feedback is that you're asking me to fix an issue, an issue that already existed, when I'm trying to introduce a new feature. If this existing issue stood in the way of introducing this new feature, then I would fix it. However, the issue does not hinder this feature's implementation. Clearly, what this feature does do is highlight the existing issue. I agree the issue should be fixed, but I believe that it should be fixed in a new PR, one that targets the issue specifically.

I don't have any objection to adding a flag for this feature.


Just to be extra clear, to reiterate what I've been saying, the @property tags have not been affected by my changes.

Here's what the CustomDate test snapshot looks like before my changes:

<?php

declare(strict_types=1);

namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Models\CustomDate
 *
 * @property \Carbon\CarbonImmutable|null $created_at
 * @property \Carbon\CarbonImmutable|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate query()
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class CustomDate extends Model
{
}

Notice that the $created_at and $updated_at properties have the same issue you're asking my to fix. I feel like you're ignoring this fact, and just assuming that somehow I have introduced this issue when in reality I have not.

Copy link
Author

@jpickwell jpickwell Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a new PR (#1056) to fix the type annotations for date attributes/properties.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing: looking at the JSON example you gave, I will try to fix that one. That has to do with the command not checking casts until after getting properties from the table:

// ModelsCommand::generateDocs
                    if ($hasDoctrine) {
                        $this->getPropertiesFromTable($model);
                    }

                    if (method_exists($model, 'getCasts')) {
                        $this->castPropertiesType($model);
                    }

castPropertiesType should probably be called from getPropertiesFromTable.

* @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereUpdatedAt(\Carbon\CarbonImmutable|null $value)
* @mixin \Eloquent
*/
class CustomDate extends Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,79 +85,79 @@
* @method static \Illuminate\Database\Eloquent\Builder|Post newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Post newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|Post query()
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBinaryNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBinaryNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBooleanNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBooleanNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereCharNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereCharNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDateNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDateNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimeNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimeNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimetzNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimetzNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDoubleNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDoubleNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereEnumNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereEnumNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereFloatNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereFloatNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIpaddressNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIpaddressNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonbNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonbNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereLongTextNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereLongTextNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMacaddressNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMacaddressNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumTextNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumTextNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereSmallIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereSmallIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereStringNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereStringNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTextNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTextNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimeNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimeNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestampNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestampNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestamptzNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestamptzNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimetzNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimetzNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedSmallIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedSmallIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedTinyIntegerNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedTinyIntegerNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable($value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBigIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBinaryNotNullable(mixed $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBinaryNullable(mixed|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBooleanNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereBooleanNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereCharNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereCharNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereCreatedAt(\Illuminate\Support\Carbon|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDateNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDateNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimeNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimeNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimetzNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDatetimetzNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDecimalNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDecimalNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDoubleNotNullable(float $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereDoubleNullable(float|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereEnumNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereEnumNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereFloatNotNullable(float $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereFloatNullable(float|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereId(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIpaddressNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereIpaddressNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonbNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereJsonbNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereLongTextNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereLongTextNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMacaddressNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMacaddressNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumTextNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereMediumTextNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereSmallIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereSmallIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereStringNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereStringNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTextNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTextNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimeNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimeNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestampNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestampNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestamptzNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimestamptzNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimetzNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTimetzNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereTinyIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedBigIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedDecimalNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedMediumIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedSmallIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedSmallIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedTinyIntegerNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUnsignedTinyIntegerNullable(integer|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUpdatedAt(\Illuminate\Support\Carbon|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNotNullable(string $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereUuidNullable(string|null $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNotNullable(integer $value)
* @method static \Illuminate\Database\Eloquent\Builder|Post whereYearNullable(integer|null $value)
* @mixin \Eloquent
*/
class Post extends Model
Expand Down
Loading