Open RazinTeqB opened 1 month ago
I am able fix the issue for my project with this.
app/Services/SethphatEloquentDocsColumnsGeneratorFix.php
<?php
namespace App\Services;
use SethPhat\EloquentDocs\Services\Generators\ColumnsGenerator;
class SethphatEloquentDocsColumnsGeneratorFix extends ColumnsGenerator {
protected function getDateCasting(string $column): string
{
$columnType = parent::getDateCasting($column);
return $columnType === 'string'
? $columnType
: $this->getRootNamespaceClassName($columnType);
}
public function getRootNamespaceClassName(string $className): string
{
return '\\' . ltrim($className, '\\');
}
}
and in `app/Providers/AppServiceProvider.php` -> `register` method
```php
$this->app->bind(
SethPhat\EloquentDocs\Services\Generators\ColumnsGenerator::class,
App\Services\SethphatEloquentDocsColumnsGeneratorFix::class
);
Interesting, thanks for reporting! I'll play with it
I am upgrading laravel 10 project to version 11. I have upgraded
sethphat/eloquent-docs
package to v2.0.1When running this command
This is how doc block is added in model
Previously it was generated like this
See difference in Carbon namespace
so after version upgrade, generated property doc block
@property Carbon\Carbon|null $deleted_at
field namespace resolved toApp\Models\Carbon\Carbon
which is in-correct.What am i missing ??