You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No.. I have never extend boot method. But your question helps me to find the issue !
// BaseMultiLangpublicfunction__construct(array$attributes = array()) {
if (empty($attributes)) {
return; // this line causes what withTrashed doesn't work !!
}
$WithoutTranslationFileds = $this->Starter($attributes);
parent::__construct($WithoutTranslationFileds);
}
Example Base Model
Example Model that extend base model that like is up!
Now we try to run WithTrashed method on test controller
Debug Screen
Trace
…/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php346
…/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php346
…/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php1700
…/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingTrait.php113
…/app/controllers/testController.php15
<#unknown>0
…/vendor/laravel/framework/src/Illuminate/Routing/Controller.php231
…/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php93
…/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php62
…/vendor/laravel/framework/src/Illuminate/Routing/Router.php930
<#unknown>0
…/vendor/laravel/framework/src/Illuminate/Routing/Route.php105
…/vendor/laravel/framework/src/Illuminate/Routing/Router.php996
…/vendor/laravel/framework/src/Illuminate/Routing/Router.php964
…/vendor/laravel/framework/src/Illuminate/Foundation/Application.php738
…/vendor/laravel/framework/src/Illuminate/Foundation/Application.php708
…/vendor/laravel/framework/src/Illuminate/Session/Middleware.php72
…/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php47
…/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php51
…/vendor/stack/builder/src/Stack/StackedHttpKernel.php23
…/vendor/laravel/framework/src/Illuminate/Foundation/Application.php606
…/public/index.php49
I'm programmer in six month. I'm not sure but there is a bug on line 322 in Laravel Model class. That addGlobalScope method doesn't work correctly!
My native language is not English. I'm sorry my explaining
The text was updated successfully, but these errors were encountered: