-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: generate nova resource #25
Conversation
Refs: #19
config/entity-generator.php
Outdated
'resources' => 'app/Http/Resources' | ||
'resources' => 'app/Http/Resources', | ||
'nova' => 'app/Nova', | ||
'nova_provider' => 'app/Providers/NovaServiceProvider.php' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'nova_provider' => 'app/Providers/NovaServiceProvider.php' |
|
||
public function generate() | ||
{ | ||
if (file_exists($this->paths['nova_provider'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we use class_exists
on the provider class instead?
if (!$this->classExists('models', $this->model)) { | ||
$this->throwFailureException( | ||
ClassNotExistsException::class, | ||
"Cannot create {$this->model} Model cause {$this->model} Model does not exists.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cannot create {$this->model} Model cause {$this->model} Model does not exists.", | |
"Cannot create {$this->model} Nova resource cause {$this->model} Model does not exists.", |
Refs: #19
Refs: #19