laravel-enso / enso

Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
https://www.laravel-enso.com
MIT License
1.08k stars 277 forks source link

cant add new package #292

Closed subtain-haider closed 4 years ago

subtain-haider commented 4 years ago

This is a bug .

Prerequisites

Description

Hello, am using laravel enso for first time and am also new to package building am having this issue, I will try to explain it detail plzzz resolve my issue as am stuck on this for 2 days.

So these are the steps which I did:

  1. I Followed all installation steps in enso documentation and installed without any issue.
  2. Then I used php artisan enso:cli
  3. Then I followed all steps in documentation but instead of simple generating, I chose the package option.
  4. Then in Package option I gave following things: name: campuses vendor: sibtain in enso cli.
  5. Then I chose Generate option which generated a package for me in vendor/sibtain/campuses.
  6. Then I customized my package according to my need.
  7. After that I placed namespace into composer.json file of my main project.
  8. Then I ran this command composer dump-autoload
  9. Then I added service provider, and did php artisan migrate:fresh --seed.
  10. And at last I published using this command php artisan vendor:publish and of course chosing my package, and then I cd into client folder of main project and run npm install, npm run prod
  11. Everything gone well till now but now when I go to this route: homestead.test/campuses it doesn't load the table even this route : homestead.test/campuses/create is also not loading the form.
  12. At homestead.test/campuses It gives following errors in console: TypeError: Cannot read property 'columns' of undefined, TypeError: Cannot read property 'style' of undefined, Uncaught (in promise) TypeError: Cannot set property 'loading' of undefined.

Following is the git repository of my main project: https://github.com/subtain-haider/eoxley

Following is the git repository of my package which is placed in project_root_folder/vendor/sibtain/campuses: https://github.com/subtain-haider/campuses

Following the screen recording of the error which I am facing: https://drive.google.com/file/d/17E5e9rvqsFfvtEA5bcIHRC0Oje7Xr_bD/view

Steps to Reproduce

Expected behavior

It should run normally as its doing with all other packages

Actual behavior

Generating random errors

aocneanu commented 4 years ago

If everybody would write issues like you, the world would be a better place ;)

aocneanu commented 4 years ago

I guess you figured it out yourself, but probably some small detail was missing, I'm not sure which one.

A recommendation in the future, load your package service providers before the ones in your local project. There's a comment in the app.php that will indicate where. The reason for this is having the possibility to customize what you need (bindings, policies etc).

subtain-haider commented 4 years ago

Sir thanks for your kind and quick reply, I just want to ask few more questions:

1: Why am getting this sql error, I tried to do as manual bt still getting the error which is also coming in ur video. (Yes, I know its not related to enso bt still if u can help).

  1. So now I always have to make package and upload it to packagist and thn use it in my project? I cant use it locally as I was using before? coz it was giving error.
  2. How can I change the header and footer of this project and the login page and the overlay which comes after logging in, Where can I find those files and edit it? I can find those pages. and also the companies, people, teams table and forms, I want to modify them and use them according to my needs
subtain-haider commented 4 years ago

Ok update, I solved the sql issue by updating table/builders/CampusTable.php by using this return Campus::selectRaw('id,code,name,email,number,type,address,city');

and almost clear on my second question bt will be more cleared if you answer

and am eagerly looking forward for the answer of my third question.

Thanks

aocneanu commented 4 years ago
  1. Great.

  2. You only have to build packages if you need (reusable between project) packages. If not the cli will generate the structure in your local project and you are good to go

  3. A good start would be reading the docs, you can find mentions there about customizing Enso. When coming to customizing keep in mind that you will have to figure out things yourself.