I have 2 models newsarticle and newscategory connected 1:n, both models use "hasTranslations"
Since upgrading backpack crud to "^3.4.0" and laravel 5.6 the crud edit operations create and update throw the following error:
"BadMethodCallException Method Illuminate\Database\Eloquent\Collection::setLocale does not exist."
When I remove the 1:n relation from newsarticle Crud controller:
$this->crud->addColumn([
'name' => 'newscategory_id',
'label' => __('admin.News_Category'),
'type' => "select",
'entity' => 'newscategory',
'attribute' => "name",
'model' => "App\Models\Newscategory",
]);
the error disappears.
What I did:
Upgraded Backpack/Crud from 3.3 to 3.4
Upgraded Laravel from 5.5 to 5.6
Bug report
I have 2 models newsarticle and newscategory connected 1:n, both models use "hasTranslations"
Since upgrading backpack crud to "^3.4.0" and laravel 5.6 the crud edit operations create and update throw the following error: "BadMethodCallException Method Illuminate\Database\Eloquent\Collection::setLocale does not exist."
When I remove the 1:n relation from newsarticle Crud controller: $this->crud->addColumn([ 'name' => 'newscategory_id', 'label' => __('admin.News_Category'), 'type' => "select", 'entity' => 'newscategory', 'attribute' => "name", 'model' => "App\Models\Newscategory", ]); the error disappears.
What I did:
Upgraded Backpack/Crud from 3.3 to 3.4 Upgraded Laravel from 5.5 to 5.6
Backpack, Laravel, PHP, DB version:
"php": ">=7.1.3", "backpack/MenuCRUD": "^1.0", "backpack/base": "^0.9.0", "backpack/crud": "^3.4.0", "backpack/langfilemanager": "^1.0", "backpack/pagemanager": "^1.1", "laravel/framework": "5.6.*", "laravel/tinker": "~1.0", "laravelcollective/html": "^5.6", "spatie/laravel-translatable": "^2.1", "themsaid/laravel-langman": "^1.3", "webpatser/laravel-countries": "dev-master"