Skip to content

Commit 2eebc3b

Browse files
committed
fix: minor fix
1 parent 0bdc6df commit 2eebc3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

views/model/model.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
namespace {{ $config->namespaces->model }};
66

77
use Illuminate\Database\Eloquent\Model;
8-
@if($config->options->softDelete) {{ 'use Illuminate\Database\Eloquent\SoftDeletes;' }};@endif
9-
@if($config->options->tests) {{ 'use Illuminate\Database\Eloquent\Factories\HasFactory;' }};@endif
8+
@if($config->options->softDelete) {{ 'use Illuminate\Database\Eloquent\SoftDeletes;' }}@endif
9+
@if($config->options->tests or $config->options->factory) {{ 'use Illuminate\Database\Eloquent\Factories\HasFactory;' }}@endif
1010

1111
@if(isset($swaggerDocs)){!! $swaggerDocs !!}@endif
1212
class {{ $config->modelNames->name }} extends Model
1313
{
1414
@if($config->options->softDelete) {{ infy_tab().'use SoftDeletes;' }}@endif
15-
@if($config->options->tests){{ infy_tab().'use HasFactory;' }}@endif
15+
@if($config->options->tests or $config->options->factory){{ infy_tab().'use HasFactory;' }}@endif
1616
public $table = '{{ $config->tableName }}';
1717

1818
@if($customPrimaryKey)@tab()protected $primaryKey = '{{ $customPrimaryKey }}';@nls(2)@endif

0 commit comments

Comments
 (0)