Completed
Branch develop-3.0 (63d375)
by Mohamed
02:58
created

HtmlServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tinyissue\Providers;
13
14
use Tinyissue\Extensions\Html;
15
16
/**
17
 * HtmlServiceProvider for extending Laravel Html service provider.
18
 *
19
 * @author Mohamed Alsharaf <[email protected]>
20
 */
21
class HtmlServiceProvider extends \Collective\Html\HtmlServiceProvider
22
{
23
    /**
24
     * Bootstrap any application services.
25
     */
26
    public function boot()
27
    {
28
        require base_path('resources/macros/html.php');
29
    }
30
31
    /**
32
     * Register the form builder instance.
33
     */
34
    protected function registerFormBuilder()
35
    {
36
        $this->app->singleton('form', function ($app) {
37
            $form = new Html\FormBuilder($app['html'], $app['url'], $app['view'], $app['session.store']->getToken());
38
39
            return $form->setSessionStore($app['session.store']);
40
        });
41
    }
42
}
43