title: Laravel 5.4 translations with constant values
body: <p>I'm facing a problem with translations. I'm pretty new with them, as I never tried to add translations into a project. I've this model for notifications in Laravel 5.4:</p>
  
  <pre><code>// /App/Notification.php
  class Notification extends Model
  {
      const NO_STATUS = 0;
      const SENT      = 100;
      const ACCEPTED  = 200;
      const ERROR     = 300;
  
      public static $statuses = [
          self::NO_STATUS =&gt; 'No status',
          self::SENT      =&gt; 'Sent',
          self::ACCEPTED  =&gt; 'Accepted',
          self::ERROR     =&gt; 'Error',
      ];
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [
          'from', 'to', 'status',
      ];
  
      /**
       * The attributes that should be hidden for arrays.
       *
       * @var array
       */
      protected $hidden = [
          //
      ];
  
      /**
       * The attributes that should be casted to native types.
       *
       * @var array
       */
      protected $casts = [
          'from' =&gt; 'integer',
          'status' =&gt; 'integer',
      ];
  
      public function isSent()
      {
          return $this-&gt;status == self::SENT;
      }
  
      public function isAccepted()
      {
          return $this-&gt;status == self::ACCEPTED;
      }
  
      public function isError()
      {
          return $this-&gt;status == self::ERROR;
      }
  
      public static function statuses()
      {
          return self::statuses();
      }
  
      public function getStatusAttribute($value)
      {
         return self::$statuses[$value];
      }
  }
  </code></pre>
  
  <p>And I have this translation file, which I'm intended to use it to convert numeric values stored in the database as status into readable text for users when they see the notifications list in a view:</p>
  
  <pre><code>// /resources/lang/en/constants.php
  return [
  
      /*
       * Notifications constants
       */
      'notification' =&gt; [
          'no_status' =&gt; 'No status',
          'sent'      =&gt; 'Sent',
          'accepted'  =&gt; 'Accepted',
          'error'     =&gt; 'Error',
      ],
  ];
  </code></pre>
  
  <p>I have the <code>getStatusAttribute</code> accessor function in the model to retrieve its status code as text, but I can't set a value to a static attribute (obviusly), like so:</p>
  
  <pre><code>public static $statuses = [
      self::NO_STATUS =&gt; trans('constants.notification.no_status'),
      self::SENT      =&gt; trans('constants.notification.sent'),
      self::ACCEPTED  =&gt; trans('constants.notification.accepted'),
      self::ERROR     =&gt; trans('constants.notification.error'),
  ];
  </code></pre>
  
  <p>Any suggestion about how can I achieve this?</p>
  
  <p>I want that the returned property in the object becomes already a translated text, instead to translate it in the view, if possible.</p>
  
  <p>Thanks for your time.</p>