No query results for model [..‚ #998
-
Hi all, I´m getting an error in one of my models, nad I can not find any log about it. When I edit one user, I get this error: No query results for model [App\Models\User]. But I don´t know what´s wrong. I have uploaded a video showing the error. I can not finad any error in my laravel.log, Thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Hello @infiniteroles Can you share the controller and model code. How did you set "APP_ENV" and "APP_DEBUG"? Cheers. |
Beta Was this translation helpful? Give feedback.
-
Sorry abut format and thank you very much for your attention, please see this formated information: -Versions: LARAVEL VERSION:10.41.0.0 BACKPACK PACKAGE VERSIONS:backpack/basset: 1.2.2
Code: Model: namespace App\Models; use Backpack\CRUD\app\Models\Traits\CrudTrait; class User extends Authenticatable implements MustVerifyEmail
} Code Controller: namespace App\Http\Controllers\Admin; use App\Http\Requests\UserRequest; /**
} |
Beta Was this translation helpful? Give feedback.
-
Great!!! It´s working perfect!! |
Beta Was this translation helpful? Give feedback.
-
Im sorry to lose this detail on code, thanks a lot @munjaldevelopment for your help. As this is solve i will close the issue, but please feel free to re-open or create a new one if needed. Cheers. |
Beta Was this translation helpful? Give feedback.
Hi @infiniteroles ,
As I understood the code at glance, I think this line is causing error:
CRUD::addField([ 'name' => 'id', 'type' => 'text', 'label' => 'Id', 'attributes' => [ 'readonly' => 'readonly', 'disabled' => 'disabled', ] ]);
Please remove "id" from addField as its auto-increment. Pl try & let me know if this works.