Try to use a combined attribute as select or relationship column value
Example :
// MyCrudController.php
$this->crud->addColumn([
'name' => 'customer',
'type' => 'relationship',
'label' => 'Customer Full Name',
'attribute' => 'full_name',
]);
// Customer.php
public function getFullNameAttribute(): string
{
return sprintf('%s %s', $this->first_name, $$this->last_name);
}
Show me the value :)
Throwed an error :(
Add my custom combined attribute in the $append entitie's property.
// Customer.php
protected $appends = [
'full_name',
];
When I run php artisan backpack:version the output is:
### PHP VERSION:
PHP 7.3.13 (cli) (built: Dec 18 2019 16:08:06) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.13, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.13, Copyright (c) 1999-2018, by Zend Technologies
### LARAVEL VERSION:
v6.18.13@39519d03237a81380e2126d667e898e2922db444
### BACKPACK VERSION:
4.1.2@7084182b38bff6b19624788ff143bb249ecdc758
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:
backpack-for-laravel tag;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
Hello @bastos71
Sorry for introducing this change without documenting it. Well, i missed it, that's why it's not documented :disappointed:
It's related to #2810
I'v fixed it with #2815
So I am going to close this.
Thanks for report :)
Thx for your answer !
My bad, I did not see the previous issue
Most helpful comment
Hello @bastos71
Sorry for introducing this change without documenting it. Well, i missed it, that's why it's not documented :disappointed:
It's related to #2810
I'v fixed it with #2815
So I am going to close this.
Thanks for report :)