InfyOmLabs / laravel-generator

API and Admin Panel CRUD Generator for Laravel.
https://www.infyom.com/open-source
MIT License
3.79k stars 814 forks source link

publish layout fails due to missing stubs #986

Closed androidedev closed 2 years ago

androidedev commented 3 years ago

Hi, in last versión after doing a "php artisan infyom.publish:layout" the command fails in some of the views

ErrorException copy(/home/dev/test/vendor/infyomlabs/adminlte-templates/templates/scaffold/auth/emails/password.stub): Failed to open stream: No such file or directory at vendor/infyomlabs/laravel-generator/src/Commands/Publish/PublishBaseCommand.php:20

It seems that the command expects some .stub files that are not present in adminlte-templates.

The steps to reproduce are the ones in infyom docs :

  1. add packages to composer.json "require": { "infyomlabs/laravel-generator": "8.0.x-dev", "laravelcollective/html": "^6.2", "infyomlabs/adminlte-templates": "8.0.x-dev" }
  2. composer update
  3. Edit 'config/app.php' to add needed config : 'providers' => [... Collective\Html\HtmlServiceProvider::class, Laracasts\Flash\FlashServiceProvider::class, //Prettus\Repository\Providers\RepositoryServiceProvider::class, \InfyOm\Generator\InfyOmGeneratorServiceProvider::class, \InfyOm\AdminLTETemplates\AdminLTETemplatesServiceProvider::class, and 'aliases' => [... 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, 'Flash' => Laracasts\Flash\Flash::class,
  4. php artisan vendor:publish --provider="InfyOm\Generator\InfyOmGeneratorServiceProvider"
  5. php artisan infyom:publish
  6. php artisan ui bootstrap --auth
  7. composer require laravel/ui:^3.0

All ok, now when doing

  1. php artisan infyom.publish:layout >> the command fails
Dri372 commented 3 years ago

Hi,

Had a look to y notes and give you what has worked for me (hope my notes are correct)

    composer require infyomlabs/laravel-generator:^3.0
    composer require laravelcollective/html:^6.2
    composer require infyomlabs/adminlte-templates:^2.0
            in config/app.php
    'Flash' => Laracasts\Flash\Flash::class,
    'Html' => Collective\Html\HtmlFacade::class,
    'Form' => Collective\Html\FormFacade::class,
    php artisan vendor:publish --provider="InfyOm\Generator\InfyOmGeneratorServiceProvider"
    php artisan infyom:publish

            composer require laravel/ui:^3.0
            php artisan ui bootstrap --auth
                            php artisan infyom.publish:layout

Let's know if it works for you.

vishalinfyom commented 2 years ago

We are no longer using that admin-lte templates, please check the updated documentation.

image