reziamini / laravel-easypanel

A beautiful and flexible admin panel creator based on Livewire for Laravel
https://easypanel.netlify.app/getting-started
MIT License
623 stars 105 forks source link

Error in create crud process #38

Closed m-mohammadi1 closed 2 years ago

m-mohammadi1 commented 2 years ago

I have just installed the latest version of the package and got this error when creating crud

ErrorException

Trying to get property 'route' of non-object

at vendor/rezaamini-ir/laravel-easypanel/src/Parsers/StubParser.php:202 198▕ '{{ modelName }}' => ucfirst($modelName), 199▕ '{{ data }}' => $this->parseDataInBlade(), 200▕ '{{ titles }}' => $this->parseTitlesInBlade(), 201▕ '{{ inputs }}' => $this->parseInputsInBlade(), ➜ 202▕ '{{ routeName }}' => crud(strtolower($modelName))->route, 203▕ ]; 204▕ 205▕ $this->setLocaleTexts(); 206▕

+28 vendor frames 

29 artisan:37 Illuminate\Foundation\Console\Kernel::handle()

The steps I passed

  1. install package
  2. add admin user
  3. create config file for Post model :: php artisan panel:config Post and get this result Post config file was created for Post model You can manage it in : app/CRUD/PostComponent.php
  4. php artisan panel:crud Post and then got the error

I think the documention is not clear and actually complete, and it makes using the package hard.

reziamini commented 2 years ago

@luckyboy1001 Hi, Please use GUI to create CRUD which is available on admin page.

m-mohammadi1 commented 2 years ago

I have tried it but got this error

Symfony\Component\Routing\Exception\RouteNotFoundException Route [admin.user.read] not defined. (View: /home/mohammad/Desktop/open-source-projects/laravel-easy-panel/laravel-app/resources/views/vendor/admin/livewire/crud/create.blade.php)

reziamini commented 2 years ago

First of all, uninstall the package completely with panel:uninstall command then clear the cruds table. then you can re-execute panel:install command.

m-mohammadi1 commented 2 years ago

I have even created a new laravel project but get the same error Symfony\Component\Routing\Exception\RouteNotFoundException Route [admin.user.read] not defined. (View: /home/mohammad/Desktop/open-source-projects/laravel-easy-panel/laravel-app/resources/views/vendor/admin/livewire/crud/create.blade.php)

Could it not be compatible with Laravel latest version?

reziamini commented 2 years ago

No, there was a problem with create page which was fixed. Please update the package to 1.8.1 version with composer, then check it out.