Skip to content

Add ability to not generate relationship methods #298

Open
@zeleniy

Description

@zeleniy

I am trying to introduce the tool into existing project which already has a lot of models distributed by different subfolders of app_path('Models'). New tables models for which i would like to generate has foreign keys with those tables. And as a consequence all such methods generated in base model points to incorrect classes:

namespace App\Models\MyFolder\Base;

class MyNewTableModel extends Model
{
        ...
	public function oldTable(): BelongsTo
	{
		return $this->belongsTo(OldTable::class);
	}
}

But old table was created manually some times ago and it's outside of MyFolder/Base folder, for instance, in app_path('Models') . \DIRECTORY_SEPARATOR . 'Orders' directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions