Files
firefly-iii/app/Http/Controllers/Controller.php

64 lines
1.5 KiB
PHP
Raw Normal View History

<?php
/**
* Controller.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
2016-02-05 12:08:25 +01:00
declare(strict_types = 1);
2015-02-06 04:39:52 +01:00
namespace FireflyIII\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
2015-06-13 10:02:36 +02:00
use Illuminate\Foundation\Bus\DispatchesJobs;
2015-02-06 04:39:52 +01:00
use Illuminate\Foundation\Validation\ValidatesRequests;
2015-02-11 07:35:10 +01:00
use Illuminate\Routing\Controller as BaseController;
2016-01-09 07:48:45 +01:00
use View;
2015-02-06 04:39:52 +01:00
2015-02-11 07:35:10 +01:00
/**
* Class Controller
*
* @package FireflyIII\Http\Controllers
*/
class Controller extends BaseController
2015-02-11 07:35:10 +01:00
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
2015-05-14 13:41:21 +02:00
2016-03-01 21:31:25 +01:00
/** @var string */
protected $dateTimeFormat;
/** @var string */
2016-01-09 07:48:45 +01:00
protected $monthAndDayFormat;
/** @var string */
2016-01-24 15:58:16 +01:00
protected $monthFormat;
2016-01-09 07:48:45 +01:00
2015-04-28 15:26:30 +02:00
/**
* Controller constructor.
2015-04-28 15:26:30 +02:00
*/
public function __construct()
{
View::share('hideBudgets', false);
View::share('hideCategories', false);
View::share('hideBills', false);
View::share('hideTags', false);
2015-05-14 13:41:21 +02:00
2016-10-29 07:44:46 +02:00
// translations:
$this->middleware(
function ($request, $next) {
$this->monthFormat = (string)trans('config.month');
$this->monthAndDayFormat = (string)trans('config.month_and_day');
$this->dateTimeFormat = (string)trans('config.date_time');
return $next($request);
}
);
2015-05-14 13:41:21 +02:00
2015-04-28 15:26:30 +02:00
}
2015-12-31 17:20:54 +01:00
2015-02-06 04:39:52 +01:00
}