Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issue - Publish User Model #3562

Closed
aerostah opened this issue Feb 25, 2021 · 5 comments
Closed

Installation Issue - Publish User Model #3562

aerostah opened this issue Feb 25, 2021 · 5 comments

Comments

@aerostah
Copy link

Greetings,

As per the title of this issue, the automatic installation process stops on Step 2 of 5. Creating users table (using Laravel's default migration). The User table is indeed present, but it won't get past Step #2.

After moving to manual installation, this one particular command produces the following error:

> php artisan backpack:publish-user-model

Command "backpack:publish-user-model" is not defined.

These are my environment details, your wisdom is greatly appreciated.

PHP VERSION:

PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

LARAVEL VERSION:

v8.29.0@d2eba352b3b3a3c515b18c5726b373fe5026733e

BACKPACK VERSION:

4.1.36@779364646e3b57258b981ff9f1bdcd9887143836

@welcome
Copy link

welcome bot commented Feb 25, 2021

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 channels:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;
  • Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;

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

promatik added a commit to Laravel-Backpack/docs that referenced this issue Feb 28, 2021
@promatik
Copy link
Contributor

Hi @aerostah!
Thank you fr rising this, that's actually our fault, that command is no longer used.
That part of the documentation is outdated.

Sorry for the trouble, I've just pushed a PR to fix it.
For now you can just skip that command.

And if you wish we can help on the automatic installation process. It should work.
Let us know more details about the error.

@aerostah
Copy link
Author

aerostah commented Mar 3, 2021

The problem is that when you go to create the user record in tinker, you get this error:

$user = new App\User();
PHP Error: Class 'App\User' not found in Psy Shell code on line 1

Both autoinstall and manual are not working. What command should i run to get the user model in place?

@promatik
Copy link
Contributor

promatik commented Mar 4, 2021

Hi @aerostah!
Laravel 8 now uses the User Model inside the App\Models folder.
Backpack supports this new approach since Laravel made the move.

I've never used Tinker, but make sure either you set it, or tinker knows the correct path of the User App\Models\User.

@aerostah
Copy link
Author

aerostah commented Mar 5, 2021

Yes, I changed the command to:

$user = new App\Models\User();

This allowed me to run the other commands and create the account,

I appreciate the help. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants