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

HtmlServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 22
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 4 1
A registerFormBuilder() 0 8 1
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