-
Notifications
You must be signed in to change notification settings - Fork 554
/
Controller.php
35 lines (28 loc) · 933 Bytes
/
Controller.php
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
<?php
namespace A17\Twill\Http\Controllers\Front;
use A17\Twill\Exceptions\Handler as TwillHandler;
use A17\Twill\Http\Controllers\Front\Helpers\Seo;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\View;
class Controller extends BaseController
{
/**
* @var Seo
*/
public $seo;
public function __construct()
{
if (Config::get('twill.bind_exception_handler', true)) {
App::singleton(ExceptionHandler::class, TwillHandler::class);
}
$this->seo = new Seo();
$this->seo->title = Config::get('twill.seo.site_title');
$this->seo->description = Config::get('twill.seo.site_desc');
$this->seo->width = 900;
$this->seo->height = 470;
View::share('seo', $this->seo);
}
}