-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
IndexController.php
43 lines (35 loc) · 953 Bytes
/
IndexController.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
36
37
38
39
40
41
42
43
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Update\Controller;
use Flarum\Http\Controller\AbstractHtmlController;
use Illuminate\Contracts\View\Factory;
use Psr\Http\Message\ServerRequestInterface as Request;
class IndexController extends AbstractHtmlController
{
/**
* @var Factory
*/
protected $view;
/**
* @param Factory $view
*/
public function __construct(Factory $view)
{
$this->view = $view;
}
/**
* @param Request $request
* @return \Psr\Http\Message\ResponseInterface
*/
public function render(Request $request)
{
$view = $this->view->make('flarum.update::app')->with('title', 'Update Flarum');
$view->with('content', $this->view->make('flarum.update::update'));
return $view;
}
}