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

feat: generate nova resource #25

Merged
merged 6 commits into from
Feb 28, 2023
Merged

feat: generate nova resource #25

merged 6 commits into from
Feb 28, 2023

Conversation

pirs1337
Copy link
Contributor

Refs: #19

@pirs1337 pirs1337 self-assigned this Feb 23, 2023
@pirs1337 pirs1337 assigned DenTray and pirs1337 and unassigned pirs1337 and DenTray Feb 23, 2023
@pirs1337 pirs1337 assigned DenTray and unassigned pirs1337 Feb 23, 2023
'resources' => 'app/Http/Resources'
'resources' => 'app/Http/Resources',
'nova' => 'app/Nova',
'nova_provider' => 'app/Providers/NovaServiceProvider.php'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'nova_provider' => 'app/Providers/NovaServiceProvider.php'


public function generate()
{
if (file_exists($this->paths['nova_provider'])) {
Copy link
Collaborator

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.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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.",

@DenTray DenTray merged commit bff5b10 into master Feb 28, 2023
@DenTray DenTray deleted the 19_generate_nova_resource branch September 18, 2023 11:46
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

Successfully merging this pull request may close these issues.

2 participants