Sami
10/12/2021, 1:55 PMuser
10/12/2021, 1:55 PMSami
10/12/2021, 2:11 PMSami
10/12/2021, 2:13 PMSami
10/12/2021, 2:16 PMuser
10/12/2021, 2:17 PMSami
10/12/2021, 2:18 PMIvan Markov
10/12/2021, 2:19 PMpboivin
10/12/2021, 2:22 PMprotected $titleColumnKey = 'id';Sami
10/12/2021, 2:26 PMpboivin
10/12/2021, 2:28 PMSami
10/12/2021, 2:30 PMSami
10/12/2021, 2:31 PMphp
class OrderItemPresenter extends Presenter {
public function productName()
{
return $this->entity->product()->first()->name;
}
}ifox
10/12/2021, 2:32 PMgetTitleInBrowserAttribute accessor maybe?pboivin
10/12/2021, 2:32 PMgetCustomTitleAttribute() and return your computed value. Then use custom_title as $titleColumnKeySami
10/12/2021, 2:38 PMSami
10/12/2021, 2:41 PMSami
10/12/2021, 2:44 PMpboivin
10/12/2021, 2:45 PMpublic function getCustomTitleAttribute()
{
return $this->product->title;
}
OrderItemController.php:
protected $titleColumnKey = 'custom_title';
I guess I just don't tend to reach for presenters all that often. Many ways to approach things.Sami
10/12/2021, 2:46 PMpboivin
10/12/2021, 2:47 PMSami
10/12/2021, 3:02 PMSami
10/12/2021, 3:02 PMRayderxx
10/12/2021, 3:31 PMifox
10/12/2021, 3:36 PMphp
function fixReverseTabnabbingVulnerabiltyInQuill($html)
{
return str_replace(['target="_blank"', "target='_blank'"], 'target="_blank" rel="noopener"', $html);
}Luís Novais
10/12/2021, 11:12 PMifox
10/12/2021, 11:38 PMifox
10/12/2021, 11:54 PMLuís Novais
10/12/2021, 11:58 PMifox
10/13/2021, 12:03 AMpublished not published(). If you're actually trying to query only published records and getting records that have published set to false in the database, something's wrong somewhere else