Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3.16k stars 892 forks source link

[Bug] Getting error when "setup_email_verification_routes" is true #5632

Closed munjaldevelopment closed 2 months ago

munjaldevelopment commented 2 months ago

Bug report

What I did

?? I have changed "setup_email_verification_routes" to true to show "email verify" page

What I expected to happen

?? It should show "email verify page"

What happened

?? Showing error Backpack\CRUD\app\Library\Auth\UserFromCookie::__invoke(): Return value must be of type ?Illuminate\Contracts\Auth\MustVerifyEmail, App\Models\User returned

What I've already tried to fix it

?? Coment this line will work return config('backpack.base.user_model_fqn')::where(config('backpack.base.email_column'), Cookie::get('backpack_email_verification'))->first();

Is it a bug in the latest version of Backpack?

Yes

After I run composer update backpack/crud the bug... is it still there? Yes

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

8.1.13

PHP EXTENSIONS:

Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, readline, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, bz2, SimpleXML, xml, xmlreader, xmlwriter, openssl, curl, com_dotnet, fileinfo, gd, gettext, gmp, intl, imap, ldap, mbstring, exif, mysqli, Phar, pdo_mysql, pdo_sqlite, soap, sockets, sodium, sqlite3, xsl, Zend OPcache, xdebug

LARAVEL VERSION:

10.48.20.0

BACKPACK PACKAGE VERSIONS:

backpack/activity-log: 2.0.5 backpack/backupmanager: v5.0.4 backpack/basset: 1.3.5 backpack/crud: 6.7.30 backpack/editable-columns: 3.0.10 backpack/filemanager: 3.0.8 backpack/generators: v6.x-dev backpack/logmanager: v5.0.2 backpack/medialibrary-uploaders: 1.2.0 backpack/menucrud: v4.0.1 backpack/newscrud: 5.1.0 backpack/pagemanager: 3.3.0 backpack/permissionmanager: 7.2.1 backpack/pro: 2.2.14 backpack/revise-operation: 2.0.0 backpack/settings: 3.1.1 backpack/theme-coreuiv2: 1.2.5 backpack/theme-coreuiv4: 1.1.2 backpack/theme-tabler: 1.2.11

Flare link to check error: https://flareapp.io/share/x7K8rAJ5

karandatwani92 commented 2 months ago

Personally discussed the issue with @munjaldevelopment

Closing - It's working perfectly.