Skip to content

Commit 42931d4

Browse files
committed
Add alias for L5.5
1 parent 872e6a3 commit 42931d4

File tree

4 files changed

+58
-45
lines changed

4 files changed

+58
-45
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ First, require the package using Composer.
4141
composer require bnbwebexpertise/laravel-bootstrap-form
4242
```
4343

44-
Now, add these service providers to your `config/app.php` file (don't add the `HtmlServiceProvider` if you already have it).
44+
For Laravel 5.5 and newer the package is auto-loaded. For older versions, you must configure the providers as described below.
45+
46+
Add these service providers to your `config/app.php` file (don't add the `HtmlServiceProvider` if you already have it).
4547

4648
```php
4749
Collective\Html\HtmlServiceProvider::class,

composer.json

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,48 @@
11
{
2-
"name": "bnbwebexpertise/laravel-bootstrap-form",
3-
"description": "Laravel 5 form wrappers for Bootstrap 3. Based on Dwight Watson version and tuned for personal requirements.",
4-
"keywords": ["laravel", "form", "bootstrap"],
5-
"license": "MIT",
6-
"authors": [
7-
{
8-
"name": "Dwight Watson",
9-
"email": "[email protected]"
10-
},
11-
{
12-
"name": "Jérémy Gaulin",
13-
"email": "[email protected]"
14-
}
15-
],
16-
"require": {
17-
"php": ">=5.4.0",
18-
"illuminate/config": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
19-
"illuminate/session": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
20-
"illuminate/support": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
21-
"laravelcollective/html": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x"
2+
"name": "bnbwebexpertise/laravel-bootstrap-form",
3+
"description": "Laravel 5 form wrappers for Bootstrap 3. Based on Dwight Watson version and tuned for personal requirements.",
4+
"keywords": [
5+
"laravel",
6+
"form",
7+
"bootstrap"
8+
],
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": "Dwight Watson",
13+
"email": "[email protected]"
2214
},
23-
"require-dev": {
24-
"phpunit/phpunit": "~5.7",
25-
"mockery/mockery": "0.9.*"
26-
},
27-
"autoload": {
28-
"psr-4": {
29-
"Bnb\\BootstrapForm\\": "src/",
30-
"Tests\\": "tests/"
31-
}
32-
},
33-
"extra": {
34-
"laravel": {
35-
"providers": [
36-
"Bnb\\BootstrapForm\\BootstrapFormServiceProvider"
37-
]
38-
}
39-
},
40-
"minimum-stability": "dev"
15+
{
16+
"name": "Jérémy Gaulin",
17+
"email": "[email protected]"
18+
}
19+
],
20+
"require": {
21+
"php": ">=5.4.0",
22+
"illuminate/config": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
23+
"illuminate/session": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
24+
"illuminate/support": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
25+
"laravelcollective/html": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x"
26+
},
27+
"require-dev": {
28+
"phpunit/phpunit": "~5.7",
29+
"mockery/mockery": "0.9.*"
30+
},
31+
"autoload": {
32+
"psr-4": {
33+
"Bnb\\BootstrapForm\\": "src/",
34+
"Tests\\": "tests/"
35+
}
36+
},
37+
"extra": {
38+
"laravel": {
39+
"providers": [
40+
"Bnb\\BootstrapForm\\BootstrapFormServiceProvider"
41+
],
42+
"aliases": {
43+
"BootForm": "Bnb\\BootstrapForm\\Facades\\BootstrapForm"
44+
}
45+
}
46+
},
47+
"minimum-stability": "dev"
4148
}

src/BootstrapFormServiceProvider.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
1-
<?php
1+
<?php
22

33
namespace Bnb\BootstrapForm;
44

55
use Illuminate\Support\ServiceProvider;
66

77
class BootstrapFormServiceProvider extends ServiceProvider
88
{
9+
910
/**
1011
* Indicates if loading of the provider is deferred.
1112
*
1213
* @var bool
1314
*/
1415
protected $defer = true;
1516

17+
1618
/**
1719
* Register the service provider.
1820
*
1921
* @return void
2022
*/
2123
public function register()
2224
{
23-
$this->mergeConfigFrom(__DIR__.'/config/config.php', 'bootstrap_form');
25+
$this->mergeConfigFrom(__DIR__ . '/config/config.php', 'bootstrap_form');
2426

25-
$this->app->singleton('bootstrap_form', function($app) {
27+
$this->app->singleton('bootstrap_form', function ($app) {
2628
$form = (new FormBuilder($app['form']))->setSessionStore($app['session.store']);
2729

2830
return new BootstrapForm($app['html'], $form, $app['config']);
2931
});
3032
}
3133

34+
3235
/**
3336
* Boot the service provider.
3437
*
@@ -37,10 +40,11 @@ public function register()
3740
public function boot()
3841
{
3942
$this->publishes([
40-
__DIR__.'/config/config.php' => config_path('bootstrap_form.php')
43+
__DIR__ . '/config/config.php' => config_path('bootstrap_form.php')
4144
], 'config');
4245
}
4346

47+
4448
/**
4549
* Get the services provided by the provider.
4650
*

src/config/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
|
2828
*/
2929

30-
'left_column_class' => 'col-sm-2 col-md-3',
30+
'left_column_class' => 'col-sm-2 col-md-3',
3131
'right_column_class' => 'col-sm-3 col-md-9',
3232

3333
'left_column_offset_class' => 'col-sm-offset-2 col-md-offset-3',
@@ -42,7 +42,7 @@
4242
|
4343
*/
4444

45-
'label_required_mark' => '*',
45+
'label_required_mark' => '*',
4646
'group_required_class' => 'required',
4747

4848
/*

0 commit comments

Comments
 (0)