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

Feature request for Base File to make this package more Advanced #266

Open
ShaikhDanish04 opened this issue Oct 3, 2023 · 0 comments
Open

Comments

@ShaikhDanish04
Copy link

I believe having base files should not repeat the models but the base files should be used as the parent class for the Models

This will keep all the auto generated values in Base File abstract which can be re-generated to make sync

/Models/Base/Role.php

abstract class RoleBase extends Model {
	protected $table = 'db_roles';
	protected $primaryKey = 'role_id';
	public $timestamps = false;

	protected $casts = [
		'tenant_id' => 'int',
		'is_default' => 'bool'
	];

	protected $fillable = [
		'tenant_id',
		'name',
		'description',
		'is_default',
		'permissions'
	];
}

/Models/Role.php

class Role extends RoleBase {
        // Override if required
	protected $fillable = [
		'tenant_id',
		'name',
		'description',
		'is_default',
		'permissions'
	];
}

I hope this is a very good feature to be implemented and will be very useful for bigger projects and make reliese a very good tool for long term in every project

👍

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