Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to not generate relationship methods #298

Open
zeleniy opened this issue Oct 3, 2024 · 0 comments
Open

Add ability to not generate relationship methods #298

zeleniy opened this issue Oct 3, 2024 · 0 comments

Comments

@zeleniy
Copy link

zeleniy commented Oct 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant