34 lines
652 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?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
2018-12-01 18:42:33 +03:00
if (!env('APP_INSTALLED') && (env('APP_ENV') !== 'testing')) {
2018-11-28 13:02:18 +03:00
return;
2017-09-14 22:21:00 +03:00
}
2018-11-28 13:02:18 +03:00
// Share user logged in
$auth_user = auth()->user();
// Share date format
$date_format = $this->getCompanyDateFormat();
$view->with(['auth_user' => $auth_user, 'date_format' => $date_format]);
2017-09-14 22:21:00 +03:00
}
}