2018-11-28 13:02:18 +03:00

34 lines
618 B
PHP

<?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')) {
return;
}
// 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]);
}
}