mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
* Add support for generating helpers for external eloquent builders * Extract external builder methods generator to its own method and add an option to toggle this feature * Check if we are using the default name of the eloquent builder * Add tests with snapshots for external eloquent builder feature * Refactor codegs * Allow for type hinting * Update test * Run cs fix * Update readme * Use getName for parameter instead of relying on __toString() * Do not use str_contains and use built in php method
17 lines
505 B
PHP
17 lines
505 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Models;
|
|
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\DoesNotGeneratePhpdocWithExternalEloquentBuilder\Builders\PostExternalQueryBuilder;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Post extends Model
|
|
{
|
|
public function newEloquentBuilder($query): PostExternalQueryBuilder
|
|
{
|
|
return new PostExternalQueryBuilder($query);
|
|
}
|
|
}
|