php artisan asgard:module:scaffold - Create additional entity at a later time with Error



  • I have successfully created a module with entity. Later I wanted to create more Entitys in this modul. However, this will not appear. I chose eloquent.
    Doctrine I know not to work. I would like to work with Eloquent.
    best regards
    Dieter


  • Global Moderator

    @dieter To make another Entity you do it manually or by using php artisan module:make-model AnotherEntity MyModuleName. It will only create new Entity file.



  • Thanks for the help, but unfortunately it is not the right way because in the admin area Permissions to Edit Role the entity at all the other thinks controller,repositories,sidebar does not exist. The command has created me only the entity but not anything what the command
    php artisan asgard: module: scaffold makes his Entity.

    Thank you anyway
    Best regards
    Dieter


  • Global Moderator

    @dieter Ofc it's right way to add entity just like you asked.
    Other question is that you don't want entity (tho you asked for it) you want full scaffold for entity again, there is no commands for that. As it scaffolds you the module from the point where you don't have to create everything for yourself. Asgard have no generators.

    But you are always welcome do PR's there's all information available in stubs of core module.



  • OK thanks for the help. I now have all created manually, and also all the files in the folders migration, Entities, controller, provider, repositories, Resources configured. Is a lot of effort and it works when creating data. Unfortunately, I still have a problem with the delivery of the ID when editing and deleting. The forgets whenever I pass the value. If I've completely solved the problem. Then I add a purely tuturial.
    best regards
    Dieter


Log in to reply