Blame view

app/Http/ViewComposers/Recurring.php 978 Bytes
b7c7a5f6   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  <?php
  
  namespace App\Http\ViewComposers;
  
  use Illuminate\View\View;
  
  class Recurring
  {
  
      /**
       * Bind data to the view.
       *
       * @param  View  $view
       * @return void
       */
      public function compose(View $view)
      {
          $recurring_frequencies = [
              'no' => trans('general.no'),
              'daily' => trans('recurring.daily'),
              'weekly' => trans('recurring.weekly'),
              'monthly' => trans('recurring.monthly'),
              'yearly' => trans('recurring.yearly'),
              'custom' => trans('recurring.custom'),
          ];
  
          $recurring_custom_frequencies = [
              'daily' => trans('recurring.days'),
              'weekly' => trans('recurring.weeks'),
              'monthly' => trans('recurring.months'),
              'yearly' => trans('recurring.years'),
          ];
  
          $view->with(['recurring_frequencies' => $recurring_frequencies, 'recurring_custom_frequencies' => $recurring_custom_frequencies]);
      }
  }