Closed rodrigoUriarte closed 5 years ago
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication mediums:
backpack-for-laravel
tag;Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
-- Justin Case The Backpack Robot
Hi @rodrigouriarte05 ,
I've just pushed support for Laravel 6 in Backpack 3.6. The v4 branch will get it soon enough (later today).
Cheers!
I tried to install fresh Backpack 4.0 on Laravel 6.0, it went like this:
1. laravel new test
As per backpack v4 installation docs:
2. cd test
3. composer require backpack/crud:"v4.x-dev as 4.0.0"
4. composer require webfactor/laravel-generators --dev
Error:
OK, let's skip it for now, next:
5. composer require backpack/generators --dev
6. composer require laracasts/generators --dev
7. php artisan backpack:install
Next, as per CRUD Tutorial:
8. php artisan make:migration:schema create_tags_table --model=0 --schema="name:string:unique"
9. php artisan migrate
10. php artisan backpack:crud tag
11. php artisan backpack:add-custom-route "Route::crud('tag', 'TagCrudController');"
12. php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('tag') }}'><i class='nav-icon fa fa-tag'></i> Tags</a></li>"
OK, now let's open our "test" website in browser: http://test.test/admin/login UI is broken - errors found in browser console (many 404 erros for script & css files, jQuery not found etc - it's trying to load from vendor/adminlte/...)
OK, let's register a new account and login. UI is broken (as expected). Let's open "Tags" menu item: http://test.test/admin/tag Response: 404 page not found.
OMG @tomsb - such a horrible experience for you installing v4beta :-)) I'm sorry.
Indeed, the generators are NOT ready for v4 yet (neither webfactor's, nor backpack's). Can't even install them right now. I've updated the v4beta docs to say this. So you can't do php artisan backpack:crud tag
either. I'll try to push a generators v4 update later today - tomorrow the latest.
What I don't understand is why the views look broken for you, though. Did the php artisan backpack:install
process fail, or go smoothly? I suspect that might be the problem - the CSS&JS assets not being published for some reason. Do you have anything in your public/packages
folder? It should look like this:
I've just tried installing it with the same steps you performed, and (ignoring the fact that the generators can't be installed) everything went smoothly... pages look crisp and work as expected...
I am having similar issues when installing the v4 beta on a clean install of laravel 6 running php 7.2. My packages folder looks like the one above.
The source code shows there are still css files and javascript files trying to be pulled from vendor/adminlte This is what my page looks like:
php artisan backpack:install
- went smoothly.
public/packages
looks just like in your screenshot.
I found view files containing vendor/adminlte:
I've just pushed v4 support for backpack/generators. So you can now generate CRUDs like before. It will also add a sidebar item and route now. One command: php artisan backpack:crud product
Thanks for joining @ikkebra . Seems like the same issue @tomsb is having. This is definitely not normal, something got messed up, but I don't understand what got messed up. It looks like you're using some old views from v3 - maybe layout.blade.php
or inc/head.blade.php
but it really doesn't make sense if it's a fresh install... I've just tried it again - it installs v4 well for me.
1) Can you please give me a screenshot of what's in your resources/views/vendor/backpack
folder? Not just folders, files also.
2) If you run php artisan backpack:version
what do you get?
Thanks!
vendor/almasaeed2010/adminlte
does not exist in your projects.Just tried again with fresh install. Everything went smoothly and UI is OK. No errors.
resources/views/vendor/backpack
- It's as it should be.
vendor/almasaeed2010/adminlte
does not exist.
php artisan backpack:version
PHP 7.2.11 (cli) (built: Oct 10 2018 02:04:07) ( ZTS MSVC15 (Visual C++ 2017) x64 )
laravel/framework v6.0.3 The Laravel Framework.
backpack/crud v4.x-dev 0703c0d Quickly build an admin interfaces using Laravel 6, CoreUI, Boostrap 4 and jQuery. backpack/generators 2.0.0 Generate files for laravel projects
Pfiew :-) Thank you @tomsb . Are the answers 1-3 from the WORKING install, or from the NON-WORKING one?
From working install. Shift-deleted non-working install before saw your previous comment.
BTW, UI is work in progress? It will look like this in the end: https://coreui.io/demo ?
Ok got it. @ikkebra maybe you can help with the 1-3 answers then? On the non-working app? To see what went wrong?
--
No, actually I consider the design pretty much done. It could use some more polish, but overall was happy with how it looks - before you said that 😆 . It's a customized CoreUI - I thought their design was a bit dated for 2019, so I put my designer gloves on, took some inspiration from Tabler, Dropbox, Stripe and... this is where I got. I call the theme/design "Backstrap" - demo here.
Not a fan of how it looks? 😄
1 & 3
2
PHP 7.2.22-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 2 2019 12:54:33) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.22-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
laravel/framework v6.0.3 The Laravel Framework.
backpack/base 1.1.11 Laravel Backpack's base package, which offers admin authentication and a blank admin panel using AdminLTE backpack/crud v4.x-dev 0703c0d Quickly build an admin interfaces using Laravel 6, CoreUI, Boostrap 4 and jQuery. backpack/generators 1.2.7 Generate files for laravel projects
I just did another clean install of everything and it loads just fine now.
3 on this new clean install
laravel/framework v6.0.3 The Laravel Framework.
backpack/crud v4.x-dev 0703c0d Quickly build an admin interfaces using Laravel 6, CoreUI, Boostrap 4 and jQuery. backpack/generators 2.0.1 Generate files for laravel projects
No, actually I consider the design pretty much done. It could use some more polish, but overall was happy with how it looks - before you said that 😆 . It's a customized CoreUI - I thought their design was a bit dated for 2019, so I put my designer gloves on, took some inspiration from Tabler, Dropbox, Stripe and... this is where I got. I call the theme/design "Backstrap" - demo here.
Not a fan of how it looks? 😄
Oh, ok. Was wondering why it looks so different from CoreUI demo 😄 Backstrap is nice but will it be possible to easily switch to default CoreUI template if needed?
Haha. Smooth :-)
Yes, you can go back to it looking like CoreUI (sidebar and header) by changing two config values in config/backpack/base.php
:
// Horizontal navbar classes. Helps make the admin panel look similar to your project's design.
- 'header_class' => 'app-header bg-transparent border-0 navbar position-relative',
+ 'header_class' => 'app-header border-0 navbar position-relative',
// Sidebar element classes.
- 'sidebar_class' => 'sidebar sidebar-pills sidebar-bg-transparent',
+ 'sidebar_class' => 'sidebar',
// Footer element classes.
- 'footer_class' => 'app-footer',
+ 'footer_class' => 'app-footer d-none',
The success/error/warning/info colors will still be Backstrap, though - we tweaked those a little bit. and how the inputs look. But I don't think those will be the thing people have a problem with, but the transparent sidebar and header. Which is... better in my opinion. Since it helps the design draw attention to the content, not the menus. But it's opinionated nonetheless, so expect plently of people will want to change it :-)
I am having similar issues when installing the v4 beta on a clean install of laravel 6 running php 7.2. My packages folder looks like the one above.
The source code shows there are still css files and javascript files trying to be pulled from vendor/adminlte This is what my page looks like:
Experiencing the same (looks exactly like this screenshot). Tried upgrading 3.6 to 4 using the upgrade guide. AdminLTE is installed by composer for some reason. HTML looks like a hybrid 3.6/4 and I have no custom views.
@martijnb92 that's great! (that we can debug this now; not that you're having problems 😄 )
How about after a php artisan view:clear
and php artisan cache:clear
?
Unfortunately that did not change anything. Also tried removing the whole vendor folder. Maybe it has something to do with de base/crud merge? backpack/base is also being installed by composer. Lastly I tried php artisan backpack:install
but that didn’t help either, except that I got two new blade topbar left/right files.
Hmm.... can I please see your composer.json
file?
"backpack/generators": "^1.2" Appears to be causing the trouble! :)
Exactly! Thanks a lot this back-and-forth @martijnb92 . I've updated the upgrade guide to mention that you also need "backpack/generators": "^2.0"
in require-dev.
Cheers!
@tomsb just added more docs for changing the top menu and sidebar colors, for a different look & feel. Ended up documenting a few good examples too, with screenshots.
I just stumbled on this issue as well.. I did not realize Backpack 4 was still in Beta since there seems to be no obvious indication of this anywhere. Maybe I'm just blind but the only place I even see 'beta' is as part of these instructions
# Note during v4 beta - this might NOT have v4 support yet
composer require webfactor/laravel-generators --dev
Which lead to an error
@tabacitu Why not remove this line of instructions altogether since it just doesn't work at the moment?
Note that using "webfactor/laravel-generators": "dev-master"
works as a result of https://github.com/webfactor/laravel-generators/commit/e325b434b8e199539ab1635fabbd85ee632037f3, so the instructions should be changed to
composer require webfactor/laravel-generators:dev-master --dev
@vesper8 v4 is not in beta right now - it's stable. Just forgot that notice since it was in beta (the beta docs have become the v4 docs). I've removed them like you suggested, you're right.
As far as I know, webfactor/laravel-generators
does provide V4 support on dev-master, but the controllers aren't updated for v4, I'll make sure to spend some time and help the guys upgrade too. I do plan to improve how we generate things A LOT in the coming months.
Bug report
New project on Laravel6 and following backpack doc, do composer require backpack/crud and composer try to install BP3.6, installation failed. There is a way to install BP4.0 on L6.0, its stable? Or maybe BP3.6 on L6.0? Im starting a new project and want to be updated. Thanks