diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c1fc0c --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/vendor +composer.phar +composer.lock +.DS_Store \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4a7ff2b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + +before_script: + - curl -s http://getcomposer.org/installer | php + - php composer.phar install --dev + +script: phpunit \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..6710706 --- /dev/null +++ b/composer.json @@ -0,0 +1,20 @@ +{ + "name": "adam-wathan/boot-forms", + "description": "Extends Illuminate\\Html\\FormBuilder to provide some Bootstrap specific conveniences", + "authors": [ + { + "name": "Adam Wathan", + "email": "adam.wathan@gmail.com" + } + ], + "require": { + "php": ">=5.3.0", + "illuminate/support": "4.0.x" + }, + "autoload": { + "psr-0": { + "AdamWathan\\BootForms": "src/" + } + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..12bee7a --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,18 @@ + + + + + ./tests/ + + + \ No newline at end of file diff --git a/src/AdamWathan/BootForms/BootFormBuilder.php b/src/AdamWathan/BootForms/BootFormBuilder.php new file mode 100644 index 0000000..764daee --- /dev/null +++ b/src/AdamWathan/BootForms/BootFormBuilder.php @@ -0,0 +1,7 @@ +app['bootform'] = $this->app->share(function($app) + { + $form = new BootFormBuilder($app['html'], $app['url'], $app['session']->getToken()); + + return $form->setSessionStore($app['session']); + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return array('bootform'); + } + +} \ No newline at end of file diff --git a/src/AdamWathan/BootForms/Facades/BootForm.php b/src/AdamWathan/BootForms/Facades/BootForm.php new file mode 100644 index 0000000..49d26bf --- /dev/null +++ b/src/AdamWathan/BootForms/Facades/BootForm.php @@ -0,0 +1,12 @@ +