beyondcode / invoker-community

74 stars 2 forks source link

Undefined array key "timestamp" : Laravel\Sanctum\PersonalAccessToken #324

Closed lotje-kinable closed 1 year ago

lotje-kinable commented 1 year ago

OS: darwin Invoker Version: 2.10.0 Laravel Version: 9.41.0 Local project: true PHP Binary: /usr/local/bin/php Route: /project/index?class=App%5CModels%5CUser&time=1669461676197&project=local-qfMtzocJsJWX9TG2hoYDyq

Error:

ErrorException 

  Undefined array key "timestamp"

  at phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/AttributeItem.php:51
     47▕         if (isset($model->getCasts()[$column->getName()])) {
     48▕             $cast = \Illuminate\Support\Arr::first(\explode(':', $model->getCasts()[$column->getName()]));
     49▕             return self::MODEL_CAST_TYPES[$cast] ?? $cast;
     50▕         }
  ➜  51▕         return self::CAST_TYPES[$column->getType()->getName()];
     52▕     }
     53▕     public static function getTitle(string $name) : string
     54▕     {
     55▕         return \ucwords(\str_replace('_', ' ', $name));

  1   phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/AttributeItem.php:51
      Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}("Undefined array key "timestamp"", "phar:///Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/AttributeItem.php")

  2   phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/AttributeItem.php:25
      _HumbugBox5bc770953b87\Invoker\Factories\AttributeItem::getCastFromColumn(Object(Laravel\Sanctum\PersonalAccessToken), Object(Doctrine\DBAL\Schema\Column))
Ahrengot commented 1 year ago

Same as #306

mpociot commented 1 year ago

See #306