Closed sachinvrg closed 8 years ago
try
composer require lokielse/laravel-admin-generator:"^2.0"
Still not working , prompts with following message -
Please add "minimum-stability": "dev",
to your package.json
can let it work.
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 - Please help.
@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}~");
@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.
try
$apiBase = \Input::getUriForPath("/{$base}~");
Sorry , no progress :(
Please check config/app.php
, make sure Input
in aliases
'aliases' => [
'Input' => Illuminate\Support\Facades\Input::class,
],
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)
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...
You should add auth
middleware to this route
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!!!
I am not sure why it is not already added, it should have been added before.But anyway good work, all the best dude!
Anyway, thanks for your feedback, It indeed contains many bugs in state.
BTW. You can try http://labs.infyom.com/laravelgenerator/
Installation command not working, When I run the following command composer require lokielse/laravel-admin-generator I am getting this error -
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.`