2016-12-14 15:19:16 +01:00
|
|
|
<?php namespace App\Ninja\Presenters;
|
|
|
|
|
|
|
|
class CompanyPresenter extends EntityPresenter
|
|
|
|
{
|
|
|
|
public function promoMessage()
|
|
|
|
{
|
|
|
|
if ( ! $this->entity->hasActivePromo()) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
return trans('texts.promo_message', [
|
|
|
|
'expires' => $this->entity->promo_expires->format('M dS, Y'),
|
2016-12-21 13:37:57 +01:00
|
|
|
'amount' => (int)($this->discount * 100) . '%'
|
2016-12-14 15:19:16 +01:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function discountMessage()
|
|
|
|
{
|
|
|
|
if ( ! $this->entity->hasActiveDiscount()) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
return trans('texts.discount_message', [
|
|
|
|
'expires' => $this->entity->discount_expires->format('M dS, Y'),
|
2016-12-21 13:39:26 +01:00
|
|
|
'amount' => (int)($this->discount * 100) . '%'
|
2016-12-14 15:19:16 +01:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|