lokielse / laravel-admin-generator

An admin console panel generator with AngularJs-Bootstrap-SBAdmin-AdminLTE for Laravel 5
MIT License
72 stars 22 forks source link

'composer require lokielse/laravel-admin-generator' Not working #5

Closed sachinvrg closed 8 years ago

sachinvrg commented 8 years ago

Installation command not working, When I run the following command composer require lokielse/laravel-admin-generator I am getting this error - screenshot from 2016-06-29 18 21 30

Error message - `Your requirements could not be resolved to an installable set of packages.

Problem 1

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.`

lokielse commented 8 years ago

try

composer require lokielse/laravel-admin-generator:"^2.0"
sachinvrg commented 8 years ago

Still not working , prompts with following message -

lokielse commented 8 years ago

Please add "minimum-stability": "dev", to your package.json can let it work.

sachinvrg commented 8 years ago

Thanks much @lokielse , I've set it up now, I've created new instance admin-demo, then run php artisan admin:new admin-demo command which run successfully. here is my app/admin-genetator.php file - return [ 'bower' => [ 'directory' => 'bower_components' ], 'namespace' => 'console', 'templates_path' => base_path('resources/admin-templates'), 'instances' => [ 'admin' => [ 'engine' => 'admin-lte', 'domain' => '192.168.11.121', 'prefix' => '', 'ng_app' => 'app', ], 'admin-demo' => [ 'engine' => 'admin-lte', 'domain' => '192.168.11.121', 'prefix' => '', 'ng_app' => 'app', ] ] ];

After setting it, I run php artisan serve --host=192.168.11.121 --port=8000 In browser when I hit http://192.168.11.121:8000/admin-demo I am getting following error - 2016-07-01 13-03-02 Please help.

lokielse commented 8 years ago

@sachinvrg thanks for your feedback. It's a bug. I fixed it in the latest version just now, your can fix it as follow step

you should change files /resources/views/console/admin-demo/app.blade.php and /vendor/lokielse/laravel-admin-generator/engines/admin-lte/views/_namespace_/_name_/app.blade.php

Add a statement at line 7 like https://github.com/lokielse/laravel-admin-generator/blob/master/engines/admin-lte/views/_namespace_/_name_/app.blade.php

$apiBase    = Input::getUriForPath("/{$base}~");
sachinvrg commented 8 years ago

@lokielse , I've updated files as per you instruction , now getting- Class 'Input' not found Am I missing something important ? Please help to to set it up, I really want to use it to create my new admin panel.

lokielse commented 8 years ago

try

$apiBase    = \Input::getUriForPath("/{$base}~");
sachinvrg commented 8 years ago

Sorry , no progress :(

lokielse commented 8 years ago

Please check config/app.php , make sure Input in aliases

'aliases' => [
     'Input'               => Illuminate\Support\Facades\Input::class,
],
sachinvrg commented 8 years ago

It wasn't there, after above changes and add 'Input' in aliases , I am getting new error -

ErrorException in 3cba7022554108f12fac4e7d0afe4c410517ae34.php line 636: Trying to get property of non-object (View: /var/www/html/angularlaravel/resources/views/console/admin-demo/app.blade.php)

lokielse commented 8 years ago

ln 636 var authUserId = '{{Auth()->user()->uid}}'; You should auth.....

app.blade.php is just a template for you, you can modify it your-self. for example: change the <title></title> in this file add css/js link into it. change html within it. and so on...

lokielse commented 8 years ago

You should add auth middleware to this route

sachinvrg commented 8 years ago

Sorry @lokielse but I think its not ready to use, I really appreciate your efforts and will keep in touch with every new commit. It would be really better if you provide any demo link for your work to check before use and also any blog for setup steps.

Thanks much!!!

sachinvrg commented 8 years ago

I am not sure why it is not already added, it should have been added before.But anyway good work, all the best dude!

lokielse commented 8 years ago

Anyway, thanks for your feedback, It indeed contains many bugs in state.

BTW. You can try http://labs.infyom.com/laravelgenerator/