Blame view

app/Http/ViewComposers/All.php 469 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
  <?php
  
  namespace App\Http\ViewComposers;
  
  use App\Traits\DateTime;
  use Illuminate\View\View;
  
  class All
  {
      use DateTime;
  
      /**
       * Bind data to the view.
       *
       * @param  View  $view
       * @return void
       */
      public function compose(View $view)
      {
          // Make sure it's installed
          if (env('APP_INSTALLED')) {
              // Share date format
              $view->with(['date_format' => $this->getCompanyDateFormat()]);
          }
      }
  }