diff --git a/.idea/exchange.iml b/.idea/exchange.iml
index e596649c..ae29d527 100644
--- a/.idea/exchange.iml
+++ b/.idea/exchange.iml
@@ -20,6 +20,7 @@
+
diff --git a/.idea/php.xml b/.idea/php.xml
index d0b92ee8..ab7087a0 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -73,6 +73,7 @@
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 357c6527..968a365c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,7 +2,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -15,32 +35,14 @@
$PROJECT_DIR$/composer.json
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
@@ -68,8 +70,26 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -158,15 +178,18 @@
+
-
-
-
-
+
+
+
+
+
+
+
-
@@ -176,35 +199,47 @@
-
-
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -245,47 +280,38 @@
+
+
+
+
-
+
-
-
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
@@ -295,6 +321,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -302,13 +351,7 @@
-
-
-
-
-
-
-
+
@@ -330,27 +373,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -372,13 +397,7 @@
-
-
-
-
-
-
-
+
@@ -393,6 +412,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -400,48 +483,80 @@
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 7e2563a8..ae2f68fb 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -48,6 +48,14 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $exception)
{
+ // This will replace our 404 response with
+ // a JSON response.
+ if ($exception instanceof ModelNotFoundException) {
+ return response()->json([
+ 'error' => 'Resource not found'
+ ], 404);
+ }
+
return parent::render($request, $exception);
}
}
diff --git a/app/Http/Controllers/RateController.php b/app/Http/Controllers/RateController.php
new file mode 100644
index 00000000..67f3bddb
--- /dev/null
+++ b/app/Http/Controllers/RateController.php
@@ -0,0 +1,40 @@
+all());
+
+ return response()->json($rate, 201);
+ }
+
+ public function update(Request $request, Rate $rate)
+ {
+ $rate->update($request->all());
+
+ return response()->json($rate, 200);
+ }
+
+ public function delete(Rate $rate)
+ {
+ $rate->delete();
+
+ return response()->json(null, 204);
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/SettingBeneficiaryController.php b/app/Http/Controllers/SettingBeneficiaryController.php
new file mode 100644
index 00000000..fdec75f7
--- /dev/null
+++ b/app/Http/Controllers/SettingBeneficiaryController.php
@@ -0,0 +1,40 @@
+all());
+
+ return response()->json($beneficiary, 201);
+ }
+
+ public function update(Request $request, SettingBeneficiary $beneficiary)
+ {
+ $beneficiary->update($request->all());
+
+ return response()->json($beneficiary, 200);
+ }
+
+ public function delete(SettingBeneficiary $beneficiary)
+ {
+ $beneficiary->delete();
+
+ return response()->json(null, 204);
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/SettingCreditController.php b/app/Http/Controllers/SettingCreditController.php
new file mode 100644
index 00000000..acf5aeb0
--- /dev/null
+++ b/app/Http/Controllers/SettingCreditController.php
@@ -0,0 +1,40 @@
+all());
+
+ return response()->json($credit, 201);
+ }
+
+ public function update(Request $request, SettingCredit $credit)
+ {
+ $credit->update($request->all());
+
+ return response()->json($credit, 200);
+ }
+
+ public function delete(SettingCredit $credit)
+ {
+ $credit->delete();
+
+ return response()->json(null, 204);
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/SettingSupplierController.php b/app/Http/Controllers/SettingSupplierController.php
new file mode 100644
index 00000000..96f0a861
--- /dev/null
+++ b/app/Http/Controllers/SettingSupplierController.php
@@ -0,0 +1,40 @@
+all());
+
+ return response()->json($supplier, 201);
+ }
+
+ public function update(Request $request, SettingSupplier $supplier)
+ {
+ $supplier->update($request->all());
+
+ return response()->json($supplier, 200);
+ }
+
+ public function delete(SettingSupplier $supplier)
+ {
+ $supplier->delete();
+
+ return response()->json(null, 204);
+ }
+}
\ No newline at end of file
diff --git a/app/Rate.php b/app/Rate.php
index c6e31f1f..dde1806a 100644
--- a/app/Rate.php
+++ b/app/Rate.php
@@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model;
class Rate extends Model
{
- //
+ protected $fillable = ['x1_cash','x1_cheque','x1_ba','x2_cash','x2_cheque','x2_ba'];
}
diff --git a/app/SettingBeneficiary.php b/app/SettingBeneficiary.php
new file mode 100644
index 00000000..b6ea22e1
--- /dev/null
+++ b/app/SettingBeneficiary.php
@@ -0,0 +1,10 @@
+=7.1.3"
+ },
+ "require-dev": {
+ "illuminate/database": "5.6.*",
+ "mockery/mockery": "~1.0",
+ "phpunit/phpunit": "~5.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.6-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Collective\\Html\\HtmlServiceProvider"
+ ],
+ "aliases": {
+ "Form": "Collective\\Html\\FormFacade",
+ "Html": "Collective\\Html\\HtmlFacade"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Collective\\Html\\": "src/"
+ },
+ "files": [
+ "src/helpers.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Taylor Otwell",
+ "email": "taylorotwell@gmail.com"
+ },
+ {
+ "name": "Adam Engebretson",
+ "email": "adam@laravelcollective.com"
+ }
+ ],
+ "description": "HTML and Form Builders for the Laravel Framework",
+ "homepage": "https://laravelcollective.com",
+ "time": "2018-04-09T14:09:32+00:00"
+ },
{
"name": "league/flysystem",
"version": "1.0.44",
diff --git a/config/app.php b/config/app.php
index b16e7f77..3bc18e7d 100644
--- a/config/app.php
+++ b/config/app.php
@@ -146,6 +146,7 @@ return [
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
+ Collective\Html\HtmlServiceProvider::class,
/*
* Package Service Providers...
@@ -208,7 +209,7 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
-
+ 'Html' => Collective\Html\HtmlFacade::class,
],
];
diff --git a/database/factories/RateFactory.php b/database/factories/RateFactory.php
new file mode 100644
index 00000000..7270d369
--- /dev/null
+++ b/database/factories/RateFactory.php
@@ -0,0 +1,9 @@
+define(App\Rate::class, function (Faker $faker) {
+ return [
+ //
+ ];
+});
diff --git a/database/factories/SettingBeneficiaryFactory.php b/database/factories/SettingBeneficiaryFactory.php
new file mode 100644
index 00000000..79204254
--- /dev/null
+++ b/database/factories/SettingBeneficiaryFactory.php
@@ -0,0 +1,9 @@
+define(App\SettingBeneficiary::class, function (Faker $faker) {
+ return [
+ //
+ ];
+});
diff --git a/database/factories/SettingCreditFactory.php b/database/factories/SettingCreditFactory.php
new file mode 100644
index 00000000..890b6be2
--- /dev/null
+++ b/database/factories/SettingCreditFactory.php
@@ -0,0 +1,9 @@
+define(App\SettingCredit::class, function (Faker $faker) {
+ return [
+ //
+ ];
+});
diff --git a/database/factories/SettingSupplierFactory.php b/database/factories/SettingSupplierFactory.php
new file mode 100644
index 00000000..918b6591
--- /dev/null
+++ b/database/factories/SettingSupplierFactory.php
@@ -0,0 +1,9 @@
+define(App\SettingSupplier::class, function (Faker $faker) {
+ return [
+ //
+ ];
+});
diff --git a/database/migrations/2018_04_23_030854_create_rates_table.php b/database/migrations/2018_04_25_085705_create_rates_table.php
similarity index 100%
rename from database/migrations/2018_04_23_030854_create_rates_table.php
rename to database/migrations/2018_04_25_085705_create_rates_table.php
diff --git a/database/migrations/2018_04_23_033128_create_time_limits_table.php b/database/migrations/2018_04_25_090015_create_setting_credits_table.php
similarity index 76%
rename from database/migrations/2018_04_23_033128_create_time_limits_table.php
rename to database/migrations/2018_04_25_090015_create_setting_credits_table.php
index 1a58779e..26568b9f 100644
--- a/database/migrations/2018_04_23_033128_create_time_limits_table.php
+++ b/database/migrations/2018_04_25_090015_create_setting_credits_table.php
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
-class CreateTimeLimitsTable extends Migration
+class CreateSettingCreditsTable extends Migration
{
/**
* Run the migrations.
@@ -13,7 +13,7 @@ class CreateTimeLimitsTable extends Migration
*/
public function up()
{
- Schema::create('time_limits', function (Blueprint $table) {
+ Schema::create('setting_credits', function (Blueprint $table) {
$table->increments('id');
$table->decimal('rmb_credit_limit');
$table->decimal('usd_credit_limit');
@@ -28,6 +28,6 @@ class CreateTimeLimitsTable extends Migration
*/
public function down()
{
- Schema::dropIfExists('time_limits');
+ Schema::dropIfExists('setting_credits');
}
}
diff --git a/database/migrations/2018_04_23_032746_create_setting_suppliers_table.php b/database/migrations/2018_04_25_090031_create_setting_suppliers_table.php
similarity index 100%
rename from database/migrations/2018_04_23_032746_create_setting_suppliers_table.php
rename to database/migrations/2018_04_25_090031_create_setting_suppliers_table.php
diff --git a/database/migrations/2018_04_23_033425_create_setting_c_i_e_f_beneficiaries_table.php b/database/migrations/2018_04_25_090057_create_setting_beneficiaries_table.php
similarity index 72%
rename from database/migrations/2018_04_23_033425_create_setting_c_i_e_f_beneficiaries_table.php
rename to database/migrations/2018_04_25_090057_create_setting_beneficiaries_table.php
index 6fb0016d..67a54c32 100644
--- a/database/migrations/2018_04_23_033425_create_setting_c_i_e_f_beneficiaries_table.php
+++ b/database/migrations/2018_04_25_090057_create_setting_beneficiaries_table.php
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
-class CreateSettingCIEFBeneficiariesTable extends Migration
+class CreateSettingBeneficiariesTable extends Migration
{
/**
* Run the migrations.
@@ -13,8 +13,8 @@ class CreateSettingCIEFBeneficiariesTable extends Migration
*/
public function up()
{
- Schema::create('setting_c_i_e_f_beneficiaries', function (Blueprint $table) {
- $table->increments('beneficiary_id');
+ Schema::create('setting_beneficiaries', function (Blueprint $table) {
+ $table->increments('id');
$table->string('company_name');
$table->string('bank_name');
$table->string('acc_no');
@@ -33,6 +33,6 @@ class CreateSettingCIEFBeneficiariesTable extends Migration
*/
public function down()
{
- Schema::dropIfExists('setting_c_i_e_f_beneficiaries');
+ Schema::dropIfExists('setting_beneficiaries');
}
}
diff --git a/routes/api.php b/routes/api.php
index a95187dd..469f0f45 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -1,6 +1,10 @@
get('/user', function (Request $request) {
return $request->user();
});
+
+Route::get('update-rate', 'RateController@index');
+Route::get('update-rate/{rate}', 'RateController@show');
+Route::post('update-rate', 'RateController@store');
+Route::put('update-rate/{rate}', 'RateController@update');
+Route::delete('update-rate/{rate}', 'RateController@delete');
+
+Route::get('setting-beneficiary', 'SettingBeneficiaryController@index');
+Route::get('setting-beneficiary/{beneficiary}', 'SettingBeneficiaryController@show');
+Route::post('setting-beneficiary', 'SettingBeneficiaryController@store');
+Route::put('setting-beneficiary/{beneficiary}', 'SettingBeneficiaryController@update');
+Route::delete('setting-beneficiary/{beneficiary}', 'SettingBeneficiaryController@delete');
+
+Route::get('setting-credit', 'SettingCreditController@index');
+Route::get('setting-credit/{credit}', 'SettingCreditController@show');
+Route::post('setting-credit', 'SettingCreditController@store');
+Route::put('setting-credit/{credit}', 'SettingCreditController@update');
+Route::delete('setting-credit/{credit}', 'SettingCreditController@delete');
+
+Route::get('setting-supplier', 'SettingSupplierController@index');
+Route::get('setting-supplier/{supplier}', 'SettingSupplierController@show');
+Route::post('setting-supplier', 'SettingSupplierController@store');
+Route::put('setting-supplier/{supplier}', 'SettingSupplierController@update');
+Route::delete('setting-supplier/{supplier}', 'SettingSupplierController@delete');
+
+/*
+//FOR UPDATE RATE
+Route::get('update-rate', function() {
+ // If the Content-Type and Accept headers are set to 'application/json',
+ // this will return a JSON structure. This will be cleaned up later.
+ return Rate::all();
+});
+
+Route::get('update-rate/{id}', function($id) {
+ return Rate::find($id);
+});
+
+Route::post('update-rate', function(Request $request) {
+ return Rate::create($request->all);
+});
+
+Route::put('update-rate/{id}', function(Request $request, $id) {
+ $rate = Rate::findOrFail($id);
+ $rate->update($request->all());
+
+ return $rate;
+});
+
+
+//FOR SETTING BENEFICIARY
+Route::get('setting-beneficiary', function() {
+ // If the Content-Type and Accept headers are set to 'application/json',
+ // this will return a JSON structure. This will be cleaned up later.
+ return SettingBeneficiary::all();
+});
+
+Route::get('setting-beneficiary/{id}', function($id) {
+ return SettingBeneficiary::find($id);
+});
+
+Route::post('setting-beneficiary', function(Request $request) {
+ return SettingBeneficiary::create($request->all);
+});
+
+Route::put('setting-beneficiary/{id}', function(Request $request, $id) {
+ $beneficiary = SettingBeneficiary::findOrFail($id);
+ $beneficiary->update($request->all());
+
+ return $beneficiary;
+});
+
+Route::delete('setting-beneficiary/{id}', function($id) {
+ SettingBeneficiary::find($id)->delete();
+
+ return 204;
+});
+
+//FOR SETTING CREDIT
+Route::get('setting-credit', function() {
+ // If the Content-Type and Accept headers are set to 'application/json',
+ // this will return a JSON structure. This will be cleaned up later.
+ return SettingCredit::all();
+});
+
+Route::get('setting-credit/{id}', function($id) {
+ return SettingCredit::find($id);
+});
+
+Route::post('setting-credit', function(Request $request) {
+ return SettingCredit::create($request->all);
+});
+
+Route::put('setting-credit/{id}', function(Request $request, $id) {
+ $credit = SettingCredit::findOrFail($id);
+ $credit->update($request->all());
+
+ return $credit;
+});
+
+//FOR SETTING SUPPLIER
+Route::get('setting-supplier', function() {
+ // If the Content-Type and Accept headers are set to 'application/json',
+ // this will return a JSON structure. This will be cleaned up later.
+ return SettingSupplier::all();
+});
+
+Route::get('setting-supplier/{id}', function($id) {
+ return SettingSupplier::find($id);
+});
+
+Route::post('setting-supplier', function(Request $request) {
+ return SettingSupplier::create($request->all);
+});
+
+Route::put('setting-supplier/{id}', function(Request $request, $id) {
+ $supplier = SettingSupplier::findOrFail($id);
+ $supplier->update($request->all());
+
+ return $supplier;
+});
+
+Route::delete('setting-supplier/{id}', function($id) {
+ SettingSupplier::find($id)->delete();
+
+ return 204;
+});
+
+*/
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index ce6c72d9..85663a8f 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -13,6 +13,9 @@ return array(
'App\\Http\\Controllers\\Auth\\RegisterController' => $baseDir . '/app/Http/Controllers/Auth/RegisterController.php',
'App\\Http\\Controllers\\Auth\\ResetPasswordController' => $baseDir . '/app/Http/Controllers/Auth/ResetPasswordController.php',
'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php',
+ 'App\\Http\\Controllers\\RateController' => $baseDir . '/app/Http/Controllers/RateController.php',
+ 'App\\Http\\Controllers\\SettingCreditController' => $baseDir . '/app/Http/Controllers/SettingCreditController.php',
+ 'App\\Http\\Controllers\\SettingSupplierController' => $baseDir . '/app/Http/Controllers/SettingSupplierController.php',
'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php',
'App\\Http\\Middleware\\EncryptCookies' => $baseDir . '/app/Http/Middleware/EncryptCookies.php',
'App\\Http\\Middleware\\RedirectIfAuthenticated' => $baseDir . '/app/Http/Middleware/RedirectIfAuthenticated.php',
@@ -25,14 +28,21 @@ return array(
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
'App\\Rate' => $baseDir . '/app/Rate.php',
- 'App\\SettingCIEFBeneficiary' => $baseDir . '/app/SettingCIEFBeneficiary.php',
+ 'App\\SettingBeneficiary' => $baseDir . '/app/SettingBeneficiary.php',
+ 'App\\SettingCredit' => $baseDir . '/app/SettingCredit.php',
'App\\SettingSupplier' => $baseDir . '/app/SettingSupplier.php',
- 'App\\TimeLimit' => $baseDir . '/app/TimeLimit.php',
'App\\User' => $baseDir . '/app/User.php',
'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php',
+ 'Collective\\Html\\Componentable' => $vendorDir . '/laravelcollective/html/src/Componentable.php',
+ 'Collective\\Html\\Eloquent\\FormAccessible' => $vendorDir . '/laravelcollective/html/src/Eloquent/FormAccessible.php',
+ 'Collective\\Html\\FormBuilder' => $vendorDir . '/laravelcollective/html/src/FormBuilder.php',
+ 'Collective\\Html\\FormFacade' => $vendorDir . '/laravelcollective/html/src/FormFacade.php',
+ 'Collective\\Html\\HtmlBuilder' => $vendorDir . '/laravelcollective/html/src/HtmlBuilder.php',
+ 'Collective\\Html\\HtmlFacade' => $vendorDir . '/laravelcollective/html/src/HtmlFacade.php',
+ 'Collective\\Html\\HtmlServiceProvider' => $vendorDir . '/laravelcollective/html/src/HtmlServiceProvider.php',
'Cron\\AbstractField' => $vendorDir . '/dragonmantank/cron-expression/src/Cron/AbstractField.php',
'Cron\\CronExpression' => $vendorDir . '/dragonmantank/cron-expression/src/Cron/CronExpression.php',
'Cron\\DayOfMonthField' => $vendorDir . '/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php',
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index e02d0e90..dfdd41d6 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -15,4 +15,5 @@ return array(
'58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'e7223560d890eab89cda23685e711e2c' => $vendorDir . '/psy/psysh/src/Psy/functions.php',
+ 'f18cc91337d49233e5754e93f3ed9ec3' => $vendorDir . '/laravelcollective/html/src/helpers.php',
);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index e7637525..09f897f3 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -44,6 +44,7 @@ return array(
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'),
+ 'Collective\\Html\\' => array($vendorDir . '/laravelcollective/html/src'),
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
'App\\' => array($baseDir . '/app'),
);
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 32ac7d7e..e83e7cff 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -16,6 +16,7 @@ class ComposerStaticInitd0143684cbb8cb41ee360a72b2c4ce33
'58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'e7223560d890eab89cda23685e711e2c' => __DIR__ . '/..' . '/psy/psysh/src/Psy/functions.php',
+ 'f18cc91337d49233e5754e93f3ed9ec3' => __DIR__ . '/..' . '/laravelcollective/html/src/helpers.php',
);
public static $prefixLengthsPsr4 = array (
@@ -101,6 +102,7 @@ class ComposerStaticInitd0143684cbb8cb41ee360a72b2c4ce33
'C' =>
array (
'Cron\\' => 5,
+ 'Collective\\Html\\' => 16,
'Carbon\\' => 7,
),
'A' =>
@@ -264,6 +266,10 @@ class ComposerStaticInitd0143684cbb8cb41ee360a72b2c4ce33
array (
0 => __DIR__ . '/..' . '/dragonmantank/cron-expression/src/Cron',
),
+ 'Collective\\Html\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/laravelcollective/html/src',
+ ),
'Carbon\\' =>
array (
0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon',
@@ -321,6 +327,9 @@ class ComposerStaticInitd0143684cbb8cb41ee360a72b2c4ce33
'App\\Http\\Controllers\\Auth\\RegisterController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/RegisterController.php',
'App\\Http\\Controllers\\Auth\\ResetPasswordController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/ResetPasswordController.php',
'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php',
+ 'App\\Http\\Controllers\\RateController' => __DIR__ . '/../..' . '/app/Http/Controllers/RateController.php',
+ 'App\\Http\\Controllers\\SettingCreditController' => __DIR__ . '/../..' . '/app/Http/Controllers/SettingCreditController.php',
+ 'App\\Http\\Controllers\\SettingSupplierController' => __DIR__ . '/../..' . '/app/Http/Controllers/SettingSupplierController.php',
'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php',
'App\\Http\\Middleware\\EncryptCookies' => __DIR__ . '/../..' . '/app/Http/Middleware/EncryptCookies.php',
'App\\Http\\Middleware\\RedirectIfAuthenticated' => __DIR__ . '/../..' . '/app/Http/Middleware/RedirectIfAuthenticated.php',
@@ -333,14 +342,21 @@ class ComposerStaticInitd0143684cbb8cb41ee360a72b2c4ce33
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
'App\\Rate' => __DIR__ . '/../..' . '/app/Rate.php',
- 'App\\SettingCIEFBeneficiary' => __DIR__ . '/../..' . '/app/SettingCIEFBeneficiary.php',
+ 'App\\SettingBeneficiary' => __DIR__ . '/../..' . '/app/SettingBeneficiary.php',
+ 'App\\SettingCredit' => __DIR__ . '/../..' . '/app/SettingCredit.php',
'App\\SettingSupplier' => __DIR__ . '/../..' . '/app/SettingSupplier.php',
- 'App\\TimeLimit' => __DIR__ . '/../..' . '/app/TimeLimit.php',
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
'Carbon\\Carbon' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Carbon.php',
'Carbon\\CarbonInterval' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterval.php',
'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php',
'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php',
+ 'Collective\\Html\\Componentable' => __DIR__ . '/..' . '/laravelcollective/html/src/Componentable.php',
+ 'Collective\\Html\\Eloquent\\FormAccessible' => __DIR__ . '/..' . '/laravelcollective/html/src/Eloquent/FormAccessible.php',
+ 'Collective\\Html\\FormBuilder' => __DIR__ . '/..' . '/laravelcollective/html/src/FormBuilder.php',
+ 'Collective\\Html\\FormFacade' => __DIR__ . '/..' . '/laravelcollective/html/src/FormFacade.php',
+ 'Collective\\Html\\HtmlBuilder' => __DIR__ . '/..' . '/laravelcollective/html/src/HtmlBuilder.php',
+ 'Collective\\Html\\HtmlFacade' => __DIR__ . '/..' . '/laravelcollective/html/src/HtmlFacade.php',
+ 'Collective\\Html\\HtmlServiceProvider' => __DIR__ . '/..' . '/laravelcollective/html/src/HtmlServiceProvider.php',
'Cron\\AbstractField' => __DIR__ . '/..' . '/dragonmantank/cron-expression/src/Cron/AbstractField.php',
'Cron\\CronExpression' => __DIR__ . '/..' . '/dragonmantank/cron-expression/src/Cron/CronExpression.php',
'Cron\\DayOfMonthField' => __DIR__ . '/..' . '/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index b03ea1c6..aba7aa0c 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -891,6 +891,76 @@
"psysh"
]
},
+ {
+ "name": "laravelcollective/html",
+ "version": "v5.6.6",
+ "version_normalized": "5.6.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/LaravelCollective/html.git",
+ "reference": "b3a10245c791a211e5f8ec37117f4549cd22aabe"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/LaravelCollective/html/zipball/b3a10245c791a211e5f8ec37117f4549cd22aabe",
+ "reference": "b3a10245c791a211e5f8ec37117f4549cd22aabe",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/http": "5.6.*",
+ "illuminate/routing": "5.6.*",
+ "illuminate/session": "5.6.*",
+ "illuminate/support": "5.6.*",
+ "illuminate/view": "5.6.*",
+ "php": ">=7.1.3"
+ },
+ "require-dev": {
+ "illuminate/database": "5.6.*",
+ "mockery/mockery": "~1.0",
+ "phpunit/phpunit": "~5.4"
+ },
+ "time": "2018-04-09T14:09:32+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.6-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Collective\\Html\\HtmlServiceProvider"
+ ],
+ "aliases": {
+ "Form": "Collective\\Html\\FormFacade",
+ "Html": "Collective\\Html\\HtmlFacade"
+ }
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Collective\\Html\\": "src/"
+ },
+ "files": [
+ "src/helpers.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Taylor Otwell",
+ "email": "taylorotwell@gmail.com"
+ },
+ {
+ "name": "Adam Engebretson",
+ "email": "adam@laravelcollective.com"
+ }
+ ],
+ "description": "HTML and Form Builders for the Laravel Framework",
+ "homepage": "https://laravelcollective.com"
+ },
{
"name": "league/flysystem",
"version": "1.0.44",
diff --git a/vendor/laravelcollective/html/CONTRIBUTING.md b/vendor/laravelcollective/html/CONTRIBUTING.md
new file mode 100755
index 00000000..2cbf8251
--- /dev/null
+++ b/vendor/laravelcollective/html/CONTRIBUTING.md
@@ -0,0 +1,3 @@
+# Laravel Contribution Guide
+
+Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). Please review the entire guide before sending a pull request.
diff --git a/vendor/laravelcollective/html/LICENSE.txt b/vendor/laravelcollective/html/LICENSE.txt
new file mode 100644
index 00000000..40cd6a3a
--- /dev/null
+++ b/vendor/laravelcollective/html/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/laravelcollective/html/composer.json b/vendor/laravelcollective/html/composer.json
new file mode 100755
index 00000000..119fce88
--- /dev/null
+++ b/vendor/laravelcollective/html/composer.json
@@ -0,0 +1,57 @@
+{
+ "name": "laravelcollective/html",
+ "description": "HTML and Form Builders for the Laravel Framework",
+ "license": "MIT",
+ "homepage": "https://laravelcollective.com",
+ "support": {
+ "issues": "https://github.com/LaravelCollective/html/issues",
+ "source": "https://github.com/LaravelCollective/html"
+ },
+ "authors": [
+ {
+ "name": "Adam Engebretson",
+ "email": "adam@laravelcollective.com"
+ },
+ {
+ "name": "Taylor Otwell",
+ "email": "taylorotwell@gmail.com"
+ }
+ ],
+ "require": {
+ "php": ">=7.1.3",
+ "illuminate/http": "5.6.*",
+ "illuminate/routing": "5.6.*",
+ "illuminate/session": "5.6.*",
+ "illuminate/support": "5.6.*",
+ "illuminate/view": "5.6.*"
+ },
+ "require-dev": {
+ "illuminate/database": "5.6.*",
+ "mockery/mockery": "~1.0",
+ "phpunit/phpunit": "~5.4"
+ },
+ "autoload": {
+ "psr-4": {
+ "Collective\\Html\\": "src/"
+ },
+ "files": [
+ "src/helpers.php"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.6-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Collective\\Html\\HtmlServiceProvider"
+ ],
+ "aliases": {
+ "Form": "Collective\\Html\\FormFacade",
+ "Html": "Collective\\Html\\HtmlFacade"
+ }
+ }
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true
+}
diff --git a/vendor/laravelcollective/html/readme.md b/vendor/laravelcollective/html/readme.md
new file mode 100644
index 00000000..4d3d9e1a
--- /dev/null
+++ b/vendor/laravelcollective/html/readme.md
@@ -0,0 +1,9 @@
+# Forms & HTML
+
+[](https://travis-ci.org/LaravelCollective/html)
+[](https://packagist.org/packages/laravelcollective/html)
+[](https://packagist.org/packages/laravelcollective/html)
+[](https://packagist.org/packages/laravelcollective/html)
+[](https://packagist.org/packages/laravelcollective/html)
+
+Official documentation for Forms & Html for The Laravel Framework can be found at the [LaravelCollective](http://laravelcollective.com) website.
diff --git a/vendor/laravelcollective/html/src/Componentable.php b/vendor/laravelcollective/html/src/Componentable.php
new file mode 100644
index 00000000..a0a364b4
--- /dev/null
+++ b/vendor/laravelcollective/html/src/Componentable.php
@@ -0,0 +1,110 @@
+getComponentData($component['signature'], $arguments);
+
+ return new HtmlString(
+ $this->view->make($component['view'], $data)->render()
+ );
+ }
+
+ /**
+ * Prepare the component data, while respecting provided defaults.
+ *
+ * @param array $signature
+ * @param array $arguments
+ *
+ * @return array
+ */
+ protected function getComponentData(array $signature, array $arguments)
+ {
+ $data = [];
+
+ $i = 0;
+ foreach ($signature as $variable => $default) {
+ // If the "variable" value is actually a numeric key, we can assume that
+ // no default had been specified for the component argument and we'll
+ // just use null instead, so that we can treat them all the same.
+ if (is_numeric($variable)) {
+ $variable = $default;
+ $default = null;
+ }
+
+ $data[$variable] = array_get($arguments, $i, $default);
+
+ $i++;
+ }
+
+ return $data;
+ }
+
+ /**
+ * Dynamically handle calls to the class.
+ *
+ * @param string $method
+ * @param array $parameters
+ *
+ * @return \Illuminate\Contracts\View\View|mixed
+ *
+ * @throws \BadMethodCallException
+ */
+ public function __call($method, $parameters)
+ {
+ if (static::hasComponent($method)) {
+ return $this->renderComponent($method, $parameters);
+ }
+
+ throw new BadMethodCallException("Method {$method} does not exist.");
+ }
+}
diff --git a/vendor/laravelcollective/html/src/Eloquent/FormAccessible.php b/vendor/laravelcollective/html/src/Eloquent/FormAccessible.php
new file mode 100644
index 00000000..0afd17ee
--- /dev/null
+++ b/vendor/laravelcollective/html/src/Eloquent/FormAccessible.php
@@ -0,0 +1,119 @@
+getAttributeFromArray($key);
+
+ // If the attribute is listed as a date, we will convert it to a DateTime
+ // instance on retrieval, which makes it quite convenient to work with
+ // date fields without having to create a mutator for each property.
+ if (in_array($key, $this->getDates())) {
+ if (! is_null($value)) {
+ $value = $this->asDateTime($value);
+ }
+ }
+
+ // If the attribute has a get mutator, we will call that then return what
+ // it returns as the value, which is useful for transforming values on
+ // retrieval from the model to a form that is more useful for usage.
+ if ($this->hasFormMutator($key)) {
+ return $this->mutateFormAttribute($key, $value);
+ }
+
+ $keys = explode('.', $key);
+
+ if ($this->isNestedModel($keys[0])) {
+ $relatedModel = $this->getRelation($keys[0]);
+
+ unset($keys[0]);
+ $key = implode('.', $keys);
+
+ if (method_exists($relatedModel, 'hasFormMutator') && $key !== '' && $relatedModel->hasFormMutator($key)) {
+ return $relatedModel->getFormValue($key);
+ }
+
+ return data_get($relatedModel, empty($key)? null: $key);
+ }
+
+ // No form mutator, let the model resolve this
+ return data_get($this, $key);
+ }
+
+ /**
+ * Check for a nested model.
+ *
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function isNestedModel($key)
+ {
+ if (in_array($key, array_keys($this->getRelations()))) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param $key
+ *
+ * @return bool
+ */
+ public function hasFormMutator($key)
+ {
+ $methods = $this->getReflection()->getMethods(ReflectionMethod::IS_PUBLIC);
+
+ $mutator = collect($methods)
+ ->first(function (ReflectionMethod $method) use ($key) {
+ return $method->getName() === 'form' . Str::studly($key) . 'Attribute';
+ });
+
+ return (bool) $mutator;
+ }
+
+ /**
+ * @param $key
+ * @param $value
+ *
+ * @return mixed
+ */
+ private function mutateFormAttribute($key, $value)
+ {
+ return $this->{'form' . Str::studly($key) . 'Attribute'}($value);
+ }
+
+ /**
+ * Get a ReflectionClass Instance
+ * @return ReflectionClass
+ */
+ protected function getReflection()
+ {
+ if (! $this->reflection) {
+ $this->reflection = new ReflectionClass($this);
+ }
+
+ return $this->reflection;
+ }
+}
diff --git a/vendor/laravelcollective/html/src/FormBuilder.php b/vendor/laravelcollective/html/src/FormBuilder.php
new file mode 100644
index 00000000..2d7a2144
--- /dev/null
+++ b/vendor/laravelcollective/html/src/FormBuilder.php
@@ -0,0 +1,1360 @@
+url = $url;
+ $this->html = $html;
+ $this->view = $view;
+ $this->csrfToken = $csrfToken;
+ $this->request = $request;
+ }
+
+ /**
+ * Open up a new HTML form.
+ *
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function open(array $options = [])
+ {
+ $method = array_get($options, 'method', 'post');
+
+ // We need to extract the proper method from the attributes. If the method is
+ // something other than GET or POST we'll use POST since we will spoof the
+ // actual method since forms don't support the reserved methods in HTML.
+ $attributes['method'] = $this->getMethod($method);
+
+ $attributes['action'] = $this->getAction($options);
+
+ $attributes['accept-charset'] = 'UTF-8';
+
+ // If the method is PUT, PATCH or DELETE we will need to add a spoofer hidden
+ // field that will instruct the Symfony request to pretend the method is a
+ // different method than it actually is, for convenience from the forms.
+ $append = $this->getAppendage($method);
+
+ if (isset($options['files']) && $options['files']) {
+ $options['enctype'] = 'multipart/form-data';
+ }
+
+ // Finally we're ready to create the final form HTML field. We will attribute
+ // format the array of attributes. We will also add on the appendage which
+ // is used to spoof requests for this PUT, PATCH, etc. methods on forms.
+ $attributes = array_merge(
+
+ $attributes, array_except($options, $this->reserved)
+
+ );
+
+ // Finally, we will concatenate all of the attributes into a single string so
+ // we can build out the final form open statement. We'll also append on an
+ // extra value for the hidden _method field if it's needed for the form.
+ $attributes = $this->html->attributes($attributes);
+
+ return $this->toHtmlString('');
+ }
+
+ /**
+ * Generate a hidden field with the current CSRF token.
+ *
+ * @return string
+ */
+ public function token()
+ {
+ $token = ! empty($this->csrfToken) ? $this->csrfToken : $this->session->token();
+
+ return $this->hidden('_token', $token);
+ }
+
+ /**
+ * Create a form label element.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ * @param bool $escape_html
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function label($name, $value = null, $options = [], $escape_html = true)
+ {
+ $this->labels[] = $name;
+
+ $options = $this->html->attributes($options);
+
+ $value = $this->formatLabel($name, $value);
+
+ if ($escape_html) {
+ $value = $this->html->entities($value);
+ }
+
+ return $this->toHtmlString('' . $value . ' ');
+ }
+
+ /**
+ * Format the label value.
+ *
+ * @param string $name
+ * @param string|null $value
+ *
+ * @return string
+ */
+ protected function formatLabel($name, $value)
+ {
+ return $value ?: ucwords(str_replace('_', ' ', $name));
+ }
+
+ /**
+ * Create a form input field.
+ *
+ * @param string $type
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function input($type, $name, $value = null, $options = [])
+ {
+ $this->type = $type;
+
+ if (! isset($options['name'])) {
+ $options['name'] = $name;
+ }
+
+ // We will get the appropriate value for the given field. We will look for the
+ // value in the session for the value in the old input data then we'll look
+ // in the model instance if one is set. Otherwise we will just use empty.
+ $id = $this->getIdAttribute($name, $options);
+
+ if (! in_array($type, $this->skipValueTypes)) {
+ $value = $this->getValueAttribute($name, $value);
+ }
+
+ // Once we have the type, value, and ID we can merge them into the rest of the
+ // attributes array so we can convert them into their HTML attribute format
+ // when creating the HTML element. Then, we will return the entire input.
+ $merge = compact('type', 'value', 'id');
+
+ $options = array_merge($options, $merge);
+
+ return $this->toHtmlString(' html->attributes($options) . '>');
+ }
+
+ /**
+ * Create a text input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function text($name, $value = null, $options = [])
+ {
+ return $this->input('text', $name, $value, $options);
+ }
+
+ /**
+ * Create a password input field.
+ *
+ * @param string $name
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function password($name, $options = [])
+ {
+ return $this->input('password', $name, '', $options);
+ }
+
+ /**
+ * Create a hidden input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function hidden($name, $value = null, $options = [])
+ {
+ return $this->input('hidden', $name, $value, $options);
+ }
+
+ /**
+ * Create a search input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function search($name, $value = null, $options = [])
+ {
+ return $this->input('search', $name, $value, $options);
+ }
+
+ /**
+ * Create an e-mail input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function email($name, $value = null, $options = [])
+ {
+ return $this->input('email', $name, $value, $options);
+ }
+
+ /**
+ * Create a tel input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function tel($name, $value = null, $options = [])
+ {
+ return $this->input('tel', $name, $value, $options);
+ }
+
+ /**
+ * Create a number input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function number($name, $value = null, $options = [])
+ {
+ return $this->input('number', $name, $value, $options);
+ }
+
+ /**
+ * Create a date input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function date($name, $value = null, $options = [])
+ {
+ if ($value instanceof DateTime) {
+ $value = $value->format('Y-m-d');
+ }
+
+ return $this->input('date', $name, $value, $options);
+ }
+
+ /**
+ * Create a datetime input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function datetime($name, $value = null, $options = [])
+ {
+ if ($value instanceof DateTime) {
+ $value = $value->format(DateTime::RFC3339);
+ }
+
+ return $this->input('datetime', $name, $value, $options);
+ }
+
+ /**
+ * Create a datetime-local input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function datetimeLocal($name, $value = null, $options = [])
+ {
+ if ($value instanceof DateTime) {
+ $value = $value->format('Y-m-d\TH:i');
+ }
+
+ return $this->input('datetime-local', $name, $value, $options);
+ }
+
+ /**
+ * Create a time input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function time($name, $value = null, $options = [])
+ {
+ return $this->input('time', $name, $value, $options);
+ }
+
+ /**
+ * Create a url input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function url($name, $value = null, $options = [])
+ {
+ return $this->input('url', $name, $value, $options);
+ }
+
+ /**
+ * Create a file input field.
+ *
+ * @param string $name
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function file($name, $options = [])
+ {
+ return $this->input('file', $name, null, $options);
+ }
+
+ /**
+ * Create a textarea input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function textarea($name, $value = null, $options = [])
+ {
+ $this->type = 'textarea';
+
+ if (! isset($options['name'])) {
+ $options['name'] = $name;
+ }
+
+ // Next we will look for the rows and cols attributes, as each of these are put
+ // on the textarea element definition. If they are not present, we will just
+ // assume some sane default values for these attributes for the developer.
+ $options = $this->setTextAreaSize($options);
+
+ $options['id'] = $this->getIdAttribute($name, $options);
+
+ $value = (string) $this->getValueAttribute($name, $value);
+
+ unset($options['size']);
+
+ // Next we will convert the attributes into a string form. Also we have removed
+ // the size attribute, as it was merely a short-cut for the rows and cols on
+ // the element. Then we'll create the final textarea elements HTML for us.
+ $options = $this->html->attributes($options);
+
+ return $this->toHtmlString('');
+ }
+
+ /**
+ * Set the text area size on the attributes.
+ *
+ * @param array $options
+ *
+ * @return array
+ */
+ protected function setTextAreaSize($options)
+ {
+ if (isset($options['size'])) {
+ return $this->setQuickTextAreaSize($options);
+ }
+
+ // If the "size" attribute was not specified, we will just look for the regular
+ // columns and rows attributes, using sane defaults if these do not exist on
+ // the attributes array. We'll then return this entire options array back.
+ $cols = array_get($options, 'cols', 50);
+
+ $rows = array_get($options, 'rows', 10);
+
+ return array_merge($options, compact('cols', 'rows'));
+ }
+
+ /**
+ * Set the text area size using the quick "size" attribute.
+ *
+ * @param array $options
+ *
+ * @return array
+ */
+ protected function setQuickTextAreaSize($options)
+ {
+ $segments = explode('x', $options['size']);
+
+ return array_merge($options, ['cols' => $segments[0], 'rows' => $segments[1]]);
+ }
+
+ /**
+ * Create a select box field.
+ *
+ * @param string $name
+ * @param array $list
+ * @param string|bool $selected
+ * @param array $selectAttributes
+ * @param array $optionsAttributes
+ * @param array $optgroupsAttributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function select(
+ $name,
+ $list = [],
+ $selected = null,
+ array $selectAttributes = [],
+ array $optionsAttributes = [],
+ array $optgroupsAttributes = []
+ ) {
+ $this->type = 'select';
+
+ // When building a select box the "value" attribute is really the selected one
+ // so we will use that when checking the model or session for a value which
+ // should provide a convenient method of re-populating the forms on post.
+ $selected = $this->getValueAttribute($name, $selected);
+
+ $selectAttributes['id'] = $this->getIdAttribute($name, $selectAttributes);
+
+ if (! isset($selectAttributes['name'])) {
+ $selectAttributes['name'] = $name;
+ }
+
+ // We will simply loop through the options and build an HTML value for each of
+ // them until we have an array of HTML declarations. Then we will join them
+ // all together into one single HTML element that can be put on the form.
+ $html = [];
+
+ if (isset($selectAttributes['placeholder'])) {
+ $html[] = $this->placeholderOption($selectAttributes['placeholder'], $selected);
+ unset($selectAttributes['placeholder']);
+ }
+
+ foreach ($list as $value => $display) {
+ $optionAttributes = $optionsAttributes[$value] ?? [];
+ $optgroupAttributes = $optgroupsAttributes[$value] ?? [];
+ $html[] = $this->getSelectOption($display, $value, $selected, $optionAttributes, $optgroupAttributes);
+ }
+
+ // Once we have all of this HTML, we can join this into a single element after
+ // formatting the attributes into an HTML "attributes" string, then we will
+ // build out a final select statement, which will contain all the values.
+ $selectAttributes = $this->html->attributes($selectAttributes);
+
+ $list = implode('', $html);
+
+ return $this->toHtmlString("{$list} ");
+ }
+
+ /**
+ * Create a select range field.
+ *
+ * @param string $name
+ * @param string $begin
+ * @param string $end
+ * @param string $selected
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function selectRange($name, $begin, $end, $selected = null, $options = [])
+ {
+ $range = array_combine($range = range($begin, $end), $range);
+
+ return $this->select($name, $range, $selected, $options);
+ }
+
+ /**
+ * Create a select year field.
+ *
+ * @param string $name
+ * @param string $begin
+ * @param string $end
+ * @param string $selected
+ * @param array $options
+ *
+ * @return mixed
+ */
+ public function selectYear()
+ {
+ return call_user_func_array([$this, 'selectRange'], func_get_args());
+ }
+
+ /**
+ * Create a select month field.
+ *
+ * @param string $name
+ * @param string $selected
+ * @param array $options
+ * @param string $format
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function selectMonth($name, $selected = null, $options = [], $format = '%B')
+ {
+ $months = [];
+
+ foreach (range(1, 12) as $month) {
+ $months[$month] = strftime($format, mktime(0, 0, 0, $month, 1));
+ }
+
+ return $this->select($name, $months, $selected, $options);
+ }
+
+ /**
+ * Get the select option for the given value.
+ *
+ * @param string $display
+ * @param string $value
+ * @param string $selected
+ * @param array $attributes
+ * @param array $optgroupAttributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function getSelectOption($display, $value, $selected, array $attributes = [], array $optgroupAttributes = [])
+ {
+ if (is_array($display)) {
+ return $this->optionGroup($display, $value, $selected, $optgroupAttributes, $attributes);
+ }
+
+ return $this->option($display, $value, $selected, $attributes);
+ }
+
+ /**
+ * Create an option group form element.
+ *
+ * @param array $list
+ * @param string $label
+ * @param string $selected
+ * @param array $attributes
+ * @param array $optionsAttributes
+ * @param integer $level
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ protected function optionGroup($list, $label, $selected, array $attributes = [], array $optionsAttributes = [], $level = 0)
+ {
+ $html = [];
+ $space = str_repeat(" ", $level);
+ foreach ($list as $value => $display) {
+ $optionAttributes = $optionsAttributes[$value] ?? [];
+ if (is_array($display)) {
+ $html[] = $this->optionGroup($display, $value, $selected, $attributes, $optionAttributes, $level+5);
+ } else {
+ $html[] = $this->option($space.$display, $value, $selected, $optionAttributes);
+ }
+ }
+ return $this->toHtmlString('html->attributes($attributes) . '>' . implode('', $html) . ' ');
+ }
+
+ /**
+ * Create a select element option.
+ *
+ * @param string $display
+ * @param string $value
+ * @param string $selected
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ protected function option($display, $value, $selected, array $attributes = [])
+ {
+ $selected = $this->getSelectedValue($value, $selected);
+
+ $options = array_merge(['value' => $value, 'selected' => $selected], $attributes);
+
+ $string = 'html->attributes($options) . '>';
+ if ($display !== null) {
+ $string .= e($display, false) . ' ';
+ }
+
+ return $this->toHtmlString($string);
+ }
+
+ /**
+ * Create a placeholder select element option.
+ *
+ * @param $display
+ * @param $selected
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ protected function placeholderOption($display, $selected)
+ {
+ $selected = $this->getSelectedValue(null, $selected);
+
+ $options = [
+ 'selected' => $selected,
+ 'value' => '',
+ ];
+
+ return $this->toHtmlString('html->attributes($options) . '>' . e($display, false) . ' ');
+ }
+
+ /**
+ * Determine if the value is selected.
+ *
+ * @param string $value
+ * @param string $selected
+ *
+ * @return null|string
+ */
+ protected function getSelectedValue($value, $selected)
+ {
+ if (is_array($selected)) {
+ return in_array($value, $selected, true) || in_array((string) $value, $selected, true) ? 'selected' : null;
+ } elseif ($selected instanceof Collection) {
+ return $selected->contains($value) ? 'selected' : null;
+ }
+ if (is_int($value) && is_bool($selected)) {
+ return (bool)$value === $selected;
+ }
+ return ((string) $value === (string) $selected) ? 'selected' : null;
+ }
+
+ /**
+ * Create a checkbox input field.
+ *
+ * @param string $name
+ * @param mixed $value
+ * @param bool $checked
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function checkbox($name, $value = 1, $checked = null, $options = [])
+ {
+ return $this->checkable('checkbox', $name, $value, $checked, $options);
+ }
+
+ /**
+ * Create a radio button input field.
+ *
+ * @param string $name
+ * @param mixed $value
+ * @param bool $checked
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function radio($name, $value = null, $checked = null, $options = [])
+ {
+ if (is_null($value)) {
+ $value = $name;
+ }
+
+ return $this->checkable('radio', $name, $value, $checked, $options);
+ }
+
+ /**
+ * Create a checkable input field.
+ *
+ * @param string $type
+ * @param string $name
+ * @param mixed $value
+ * @param bool $checked
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ protected function checkable($type, $name, $value, $checked, $options)
+ {
+ $this->type = $type;
+
+ $checked = $this->getCheckedState($type, $name, $value, $checked);
+
+ if ($checked) {
+ $options['checked'] = 'checked';
+ }
+
+ return $this->input($type, $name, $value, $options);
+ }
+
+ /**
+ * Get the check state for a checkable input.
+ *
+ * @param string $type
+ * @param string $name
+ * @param mixed $value
+ * @param bool $checked
+ *
+ * @return bool
+ */
+ protected function getCheckedState($type, $name, $value, $checked)
+ {
+ switch ($type) {
+ case 'checkbox':
+ return $this->getCheckboxCheckedState($name, $value, $checked);
+
+ case 'radio':
+ return $this->getRadioCheckedState($name, $value, $checked);
+
+ default:
+ return $this->compareValues($name, $value);
+ }
+ }
+
+ /**
+ * Get the check state for a checkbox input.
+ *
+ * @param string $name
+ * @param mixed $value
+ * @param bool $checked
+ *
+ * @return bool
+ */
+ protected function getCheckboxCheckedState($name, $value, $checked)
+ {
+ $request = $this->request($name);
+
+ if (isset($this->session) && ! $this->oldInputIsEmpty() && is_null($this->old($name)) && !$request) {
+ return false;
+ }
+
+ if ($this->missingOldAndModel($name) && is_null($request)) {
+ return $checked;
+ }
+
+ $posted = $this->getValueAttribute($name, $checked);
+
+ if (is_array($posted)) {
+ return in_array($value, $posted);
+ } elseif ($posted instanceof Collection) {
+ return $posted->contains('id', $value);
+ } else {
+ return (bool) $posted;
+ }
+ }
+
+ /**
+ * Get the check state for a radio input.
+ *
+ * @param string $name
+ * @param mixed $value
+ * @param bool $checked
+ *
+ * @return bool
+ */
+ protected function getRadioCheckedState($name, $value, $checked)
+ {
+ $request = $this->request($name);
+
+ if ($this->missingOldAndModel($name) && !$request) {
+ return $checked;
+ }
+
+ return $this->compareValues($name, $value);
+ }
+
+ /**
+ * Determine if the provide value loosely compares to the value assigned to the field.
+ * Use loose comparison because Laravel model casting may be in affect and therefore
+ * 1 == true and 0 == false.
+ *
+ * @param string $name
+ * @param string $value
+ * @return bool
+ */
+ protected function compareValues($name, $value)
+ {
+ return $this->getValueAttribute($name) == $value;
+ }
+
+ /**
+ * Determine if old input or model input exists for a key.
+ *
+ * @param string $name
+ *
+ * @return bool
+ */
+ protected function missingOldAndModel($name)
+ {
+ return (is_null($this->old($name)) && is_null($this->getModelValueAttribute($name)));
+ }
+
+ /**
+ * Create a HTML reset input element.
+ *
+ * @param string $value
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function reset($value, $attributes = [])
+ {
+ return $this->input('reset', null, $value, $attributes);
+ }
+
+ /**
+ * Create a HTML image input element.
+ *
+ * @param string $url
+ * @param string $name
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function image($url, $name = null, $attributes = [])
+ {
+ $attributes['src'] = $this->url->asset($url);
+
+ return $this->input('image', $name, null, $attributes);
+ }
+
+ /**
+ * Create a color input field.
+ *
+ * @param string $name
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function color($name, $value = null, $options = [])
+ {
+ return $this->input('color', $name, $value, $options);
+ }
+
+ /**
+ * Create a submit button element.
+ *
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function submit($value = null, $options = [])
+ {
+ return $this->input('submit', null, $value, $options);
+ }
+
+ /**
+ * Create a button element.
+ *
+ * @param string $value
+ * @param array $options
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function button($value = null, $options = [])
+ {
+ if (! array_key_exists('type', $options)) {
+ $options['type'] = 'button';
+ }
+
+ return $this->toHtmlString('html->attributes($options) . '>' . $value . ' ');
+ }
+
+ /**
+ * Parse the form action method.
+ *
+ * @param string $method
+ *
+ * @return string
+ */
+ protected function getMethod($method)
+ {
+ $method = strtoupper($method);
+
+ return $method !== 'GET' ? 'POST' : $method;
+ }
+
+ /**
+ * Get the form action from the options.
+ *
+ * @param array $options
+ *
+ * @return string
+ */
+ protected function getAction(array $options)
+ {
+ // We will also check for a "route" or "action" parameter on the array so that
+ // developers can easily specify a route or controller action when creating
+ // a form providing a convenient interface for creating the form actions.
+ if (isset($options['url'])) {
+ return $this->getUrlAction($options['url']);
+ }
+
+ if (isset($options['route'])) {
+ return $this->getRouteAction($options['route']);
+ }
+
+ // If an action is available, we are attempting to open a form to a controller
+ // action route. So, we will use the URL generator to get the path to these
+ // actions and return them from the method. Otherwise, we'll use current.
+ elseif (isset($options['action'])) {
+ return $this->getControllerAction($options['action']);
+ }
+
+ return $this->url->current();
+ }
+
+ /**
+ * Get the action for a "url" option.
+ *
+ * @param array|string $options
+ *
+ * @return string
+ */
+ protected function getUrlAction($options)
+ {
+ if (is_array($options)) {
+ return $this->url->to($options[0], array_slice($options, 1));
+ }
+
+ return $this->url->to($options);
+ }
+
+ /**
+ * Get the action for a "route" option.
+ *
+ * @param array|string $options
+ *
+ * @return string
+ */
+ protected function getRouteAction($options)
+ {
+ if (is_array($options)) {
+ return $this->url->route($options[0], array_slice($options, 1));
+ }
+
+ return $this->url->route($options);
+ }
+
+ /**
+ * Get the action for an "action" option.
+ *
+ * @param array|string $options
+ *
+ * @return string
+ */
+ protected function getControllerAction($options)
+ {
+ if (is_array($options)) {
+ return $this->url->action($options[0], array_slice($options, 1));
+ }
+
+ return $this->url->action($options);
+ }
+
+ /**
+ * Get the form appendage for the given method.
+ *
+ * @param string $method
+ *
+ * @return string
+ */
+ protected function getAppendage($method)
+ {
+ list($method, $appendage) = [strtoupper($method), ''];
+
+ // If the HTTP method is in this list of spoofed methods, we will attach the
+ // method spoofer hidden input to the form. This allows us to use regular
+ // form to initiate PUT and DELETE requests in addition to the typical.
+ if (in_array($method, $this->spoofedMethods)) {
+ $appendage .= $this->hidden('_method', $method);
+ }
+
+ // If the method is something other than GET we will go ahead and attach the
+ // CSRF token to the form, as this can't hurt and is convenient to simply
+ // always have available on every form the developers creates for them.
+ if ($method !== 'GET') {
+ $appendage .= $this->token();
+ }
+
+ return $appendage;
+ }
+
+ /**
+ * Get the ID attribute for a field name.
+ *
+ * @param string $name
+ * @param array $attributes
+ *
+ * @return string
+ */
+ public function getIdAttribute($name, $attributes)
+ {
+ if (array_key_exists('id', $attributes)) {
+ return $attributes['id'];
+ }
+
+ if (in_array($name, $this->labels)) {
+ return $name;
+ }
+ }
+
+ /**
+ * Get the value that should be assigned to the field.
+ *
+ * @param string $name
+ * @param string $value
+ *
+ * @return mixed
+ */
+ public function getValueAttribute($name, $value = null)
+ {
+ if (is_null($name)) {
+ return $value;
+ }
+
+ $old = $this->old($name);
+
+ if (! is_null($old) && $name !== '_method') {
+ return $old;
+ }
+
+ if (function_exists('app')) {
+ $hasNullMiddleware = app("Illuminate\Contracts\Http\Kernel")
+ ->hasMiddleware(ConvertEmptyStringsToNull::class);
+
+ if ($hasNullMiddleware
+ && is_null($old)
+ && is_null($value)
+ && ! is_null($this->view->shared('errors'))
+ && count($this->view->shared('errors')) > 0
+ ) {
+ return null;
+ }
+ }
+
+ $request = $this->request($name);
+ if (! is_null($request) && $name != '_method') {
+ return $request;
+ }
+
+ if (! is_null($value)) {
+ return $value;
+ }
+
+ if (isset($this->model)) {
+ return $this->getModelValueAttribute($name);
+ }
+ }
+
+ /**
+ * Get value from current Request
+ * @param $name
+ * @return array|null|string
+ */
+ protected function request($name)
+ {
+ if (! isset($this->request)) {
+ return null;
+ }
+
+ return $this->request->input($this->transformKey($name));
+ }
+
+ /**
+ * Get the model value that should be assigned to the field.
+ *
+ * @param string $name
+ *
+ * @return mixed
+ */
+ protected function getModelValueAttribute($name)
+ {
+ $key = $this->transformKey($name);
+
+ if (method_exists($this->model, 'getFormValue')) {
+ return $this->model->getFormValue($key);
+ }
+
+ return data_get($this->model, $this->transformKey($name));
+ }
+
+ /**
+ * Get a value from the session's old input.
+ *
+ * @param string $name
+ *
+ * @return mixed
+ */
+ public function old($name)
+ {
+ if (isset($this->session)) {
+ $key = $this->transformKey($name);
+ $payload = $this->session->getOldInput($key);
+
+ if (! is_array($payload)) {
+ return $payload;
+ }
+
+ if (! in_array($this->type, ['select', 'checkbox'])) {
+ if (! isset($this->payload[$key])) {
+ $this->payload[$key] = collect($payload);
+ }
+
+ if (! empty($this->payload[$key])) {
+ $value = $this->payload[$key]->shift();
+ return $value;
+ }
+ }
+
+ return $payload;
+ }
+ }
+
+ /**
+ * Determine if the old input is empty.
+ *
+ * @return bool
+ */
+ public function oldInputIsEmpty()
+ {
+ return (isset($this->session) && count((array) $this->session->getOldInput()) === 0);
+ }
+
+ /**
+ * Transform key from array to dot syntax.
+ *
+ * @param string $key
+ *
+ * @return mixed
+ */
+ protected function transformKey($key)
+ {
+ return str_replace(['.', '[]', '[', ']'], ['_', '', '.', ''], $key);
+ }
+
+ /**
+ * Transform the string to an Html serializable object
+ *
+ * @param $html
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ protected function toHtmlString($html)
+ {
+ return new HtmlString($html);
+ }
+
+ /**
+ * Get the session store implementation.
+ *
+ * @return \Illuminate\Contracts\Session\Session $session
+ */
+ public function getSessionStore()
+ {
+ return $this->session;
+ }
+
+ /**
+ * Set the session store implementation.
+ *
+ * @param \Illuminate\Contracts\Session\Session $session
+ *
+ * @return $this
+ */
+ public function setSessionStore(Session $session)
+ {
+ $this->session = $session;
+
+ return $this;
+ }
+
+ /**
+ * Dynamically handle calls to the class.
+ *
+ * @param string $method
+ * @param array $parameters
+ *
+ * @return \Illuminate\Contracts\View\View|mixed
+ *
+ * @throws \BadMethodCallException
+ */
+ public function __call($method, $parameters)
+ {
+ if (static::hasComponent($method)) {
+ return $this->componentCall($method, $parameters);
+ }
+
+ if (static::hasMacro($method)) {
+ return $this->macroCall($method, $parameters);
+ }
+
+ throw new BadMethodCallException("Method {$method} does not exist.");
+ }
+}
diff --git a/vendor/laravelcollective/html/src/FormFacade.php b/vendor/laravelcollective/html/src/FormFacade.php
new file mode 100644
index 00000000..24d2610e
--- /dev/null
+++ b/vendor/laravelcollective/html/src/FormFacade.php
@@ -0,0 +1,22 @@
+url = $url;
+ $this->view = $view;
+ }
+
+ /**
+ * Convert an HTML string to entities.
+ *
+ * @param string $value
+ *
+ * @return string
+ */
+ public function entities($value)
+ {
+ return htmlentities($value, ENT_QUOTES, 'UTF-8', false);
+ }
+
+ /**
+ * Convert entities to HTML characters.
+ *
+ * @param string $value
+ *
+ * @return string
+ */
+ public function decode($value)
+ {
+ return html_entity_decode($value, ENT_QUOTES, 'UTF-8');
+ }
+
+ /**
+ * Generate a link to a JavaScript file.
+ *
+ * @param string $url
+ * @param array $attributes
+ * @param bool $secure
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function script($url, $attributes = [], $secure = null)
+ {
+ $attributes['src'] = $this->url->asset($url, $secure);
+
+ return $this->toHtmlString('');
+ }
+
+ /**
+ * Generate a link to a CSS file.
+ *
+ * @param string $url
+ * @param array $attributes
+ * @param bool $secure
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function style($url, $attributes = [], $secure = null)
+ {
+ $defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet'];
+
+ $attributes = array_merge($defaults, $attributes);
+
+ $attributes['href'] = $this->url->asset($url, $secure);
+
+ return $this->toHtmlString(' attributes($attributes) . '>');
+ }
+
+ /**
+ * Generate an HTML image element.
+ *
+ * @param string $url
+ * @param string $alt
+ * @param array $attributes
+ * @param bool $secure
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function image($url, $alt = null, $attributes = [], $secure = null)
+ {
+ $attributes['alt'] = $alt;
+
+ return $this->toHtmlString(' attributes($attributes) . '>');
+ }
+
+ /**
+ * Generate a link to a Favicon file.
+ *
+ * @param string $url
+ * @param array $attributes
+ * @param bool $secure
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function favicon($url, $attributes = [], $secure = null)
+ {
+ $defaults = ['rel' => 'shortcut icon', 'type' => 'image/x-icon'];
+
+ $attributes = array_merge($attributes, $defaults);
+
+ $attributes['href'] = $this->url->asset($url, $secure);
+
+ return $this->toHtmlString(' attributes($attributes) . '>');
+ }
+
+ /**
+ * Generate a HTML link.
+ *
+ * @param string $url
+ * @param string $title
+ * @param array $attributes
+ * @param bool $secure
+ * @param bool $escape
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function link($url, $title = null, $attributes = [], $secure = null, $escape = true)
+ {
+ $url = $this->url->to($url, [], $secure);
+
+ if (is_null($title) || $title === false) {
+ $title = $url;
+ }
+
+ if ($escape) {
+ $title = $this->entities($title);
+ }
+
+ return $this->toHtmlString('attributes($attributes) . '>' . $title . ' ');
+ }
+
+ /**
+ * Generate a HTTPS HTML link.
+ *
+ * @param string $url
+ * @param string $title
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function secureLink($url, $title = null, $attributes = [])
+ {
+ return $this->link($url, $title, $attributes, true);
+ }
+
+ /**
+ * Generate a HTML link to an asset.
+ *
+ * @param string $url
+ * @param string $title
+ * @param array $attributes
+ * @param bool $secure
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function linkAsset($url, $title = null, $attributes = [], $secure = null)
+ {
+ $url = $this->url->asset($url, $secure);
+
+ return $this->link($url, $title ?: $url, $attributes, $secure);
+ }
+
+ /**
+ * Generate a HTTPS HTML link to an asset.
+ *
+ * @param string $url
+ * @param string $title
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function linkSecureAsset($url, $title = null, $attributes = [])
+ {
+ return $this->linkAsset($url, $title, $attributes, true);
+ }
+
+ /**
+ * Generate a HTML link to a named route.
+ *
+ * @param string $name
+ * @param string $title
+ * @param array $parameters
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function linkRoute($name, $title = null, $parameters = [], $attributes = [])
+ {
+ return $this->link($this->url->route($name, $parameters), $title, $attributes);
+ }
+
+ /**
+ * Generate a HTML link to a controller action.
+ *
+ * @param string $action
+ * @param string $title
+ * @param array $parameters
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function linkAction($action, $title = null, $parameters = [], $attributes = [])
+ {
+ return $this->link($this->url->action($action, $parameters), $title, $attributes);
+ }
+
+ /**
+ * Generate a HTML link to an email address.
+ *
+ * @param string $email
+ * @param string $title
+ * @param array $attributes
+ * @param bool $escape
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function mailto($email, $title = null, $attributes = [], $escape = true)
+ {
+ $email = $this->email($email);
+
+ $title = $title ?: $email;
+
+ if ($escape) {
+ $title = $this->entities($title);
+ }
+
+ $email = $this->obfuscate('mailto:') . $email;
+
+ return $this->toHtmlString('attributes($attributes) . '>' . $title . ' ');
+ }
+
+ /**
+ * Obfuscate an e-mail address to prevent spam-bots from sniffing it.
+ *
+ * @param string $email
+ *
+ * @return string
+ */
+ public function email($email)
+ {
+ return str_replace('@', '@', $this->obfuscate($email));
+ }
+
+ /**
+ * Generates non-breaking space entities based on number supplied.
+ *
+ * @param int $num
+ *
+ * @return string
+ */
+ public function nbsp($num = 1)
+ {
+ return str_repeat(' ', $num);
+ }
+
+ /**
+ * Generate an ordered list of items.
+ *
+ * @param array $list
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString|string
+ */
+ public function ol($list, $attributes = [])
+ {
+ return $this->listing('ol', $list, $attributes);
+ }
+
+ /**
+ * Generate an un-ordered list of items.
+ *
+ * @param array $list
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString|string
+ */
+ public function ul($list, $attributes = [])
+ {
+ return $this->listing('ul', $list, $attributes);
+ }
+
+ /**
+ * Generate a description list of items.
+ *
+ * @param array $list
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function dl(array $list, array $attributes = [])
+ {
+ $attributes = $this->attributes($attributes);
+
+ $html = "";
+
+ foreach ($list as $key => $value) {
+ $value = (array) $value;
+
+ $html .= "$key ";
+
+ foreach ($value as $v_key => $v_value) {
+ $html .= "$v_value ";
+ }
+ }
+
+ $html .= ' ';
+
+ return $this->toHtmlString($html);
+ }
+
+ /**
+ * Create a listing HTML element.
+ *
+ * @param string $type
+ * @param array $list
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString|string
+ */
+ protected function listing($type, $list, $attributes = [])
+ {
+ $html = '';
+
+ if (count($list) === 0) {
+ return $html;
+ }
+
+ // Essentially we will just spin through the list and build the list of the HTML
+ // elements from the array. We will also handled nested lists in case that is
+ // present in the array. Then we will build out the final listing elements.
+ foreach ($list as $key => $value) {
+ $html .= $this->listingElement($key, $type, $value);
+ }
+
+ $attributes = $this->attributes($attributes);
+
+ return $this->toHtmlString("<{$type}{$attributes}>{$html}{$type}>");
+ }
+
+ /**
+ * Create the HTML for a listing element.
+ *
+ * @param mixed $key
+ * @param string $type
+ * @param mixed $value
+ *
+ * @return string
+ */
+ protected function listingElement($key, $type, $value)
+ {
+ if (is_array($value)) {
+ return $this->nestedListing($key, $type, $value);
+ } else {
+ return '' . e($value, false) . ' ';
+ }
+ }
+
+ /**
+ * Create the HTML for a nested listing attribute.
+ *
+ * @param mixed $key
+ * @param string $type
+ * @param mixed $value
+ *
+ * @return string
+ */
+ protected function nestedListing($key, $type, $value)
+ {
+ if (is_int($key)) {
+ return $this->listing($type, $value);
+ } else {
+ return '' . $key . $this->listing($type, $value) . ' ';
+ }
+ }
+
+ /**
+ * Build an HTML attribute string from an array.
+ *
+ * @param array $attributes
+ *
+ * @return string
+ */
+ public function attributes($attributes)
+ {
+ $html = [];
+
+ foreach ((array) $attributes as $key => $value) {
+ $element = $this->attributeElement($key, $value);
+
+ if (! is_null($element)) {
+ $html[] = $element;
+ }
+ }
+
+ return count($html) > 0 ? ' ' . implode(' ', $html) : '';
+ }
+
+ /**
+ * Build a single attribute element.
+ *
+ * @param string $key
+ * @param string $value
+ *
+ * @return string
+ */
+ protected function attributeElement($key, $value)
+ {
+ // For numeric keys we will assume that the value is a boolean attribute
+ // where the presence of the attribute represents a true value and the
+ // absence represents a false value.
+ // This will convert HTML attributes such as "required" to a correct
+ // form instead of using incorrect numerics.
+ if (is_numeric($key)) {
+ return $value;
+ }
+
+ // Treat boolean attributes as HTML properties
+ if (is_bool($value) && $key !== 'value') {
+ return $value ? $key : '';
+ }
+
+ if (! is_null($value)) {
+ return $key . '="' . e($value, false) . '"';
+ }
+ }
+
+ /**
+ * Obfuscate a string to prevent spam-bots from sniffing it.
+ *
+ * @param string $value
+ *
+ * @return string
+ */
+ public function obfuscate($value)
+ {
+ $safe = '';
+
+ foreach (str_split($value) as $letter) {
+ if (ord($letter) > 128) {
+ return $letter;
+ }
+
+ // To properly obfuscate the value, we will randomly convert each letter to
+ // its entity or hexadecimal representation, keeping a bot from sniffing
+ // the randomly obfuscated letters out of the string on the responses.
+ switch (rand(1, 3)) {
+ case 1:
+ $safe .= '' . ord($letter) . ';';
+ break;
+
+ case 2:
+ $safe .= '' . dechex(ord($letter)) . ';';
+ break;
+
+ case 3:
+ $safe .= $letter;
+ }
+ }
+
+ return $safe;
+ }
+
+ /**
+ * Generate a meta tag.
+ *
+ * @param string $name
+ * @param string $content
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function meta($name, $content, array $attributes = [])
+ {
+ $defaults = compact('name', 'content');
+
+ $attributes = array_merge($defaults, $attributes);
+
+ return $this->toHtmlString(' attributes($attributes) . '>');
+ }
+
+ /**
+ * Generate an html tag.
+ *
+ * @param string $tag
+ * @param mixed $content
+ * @param array $attributes
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ public function tag($tag, $content, array $attributes = [])
+ {
+ $content = is_array($content) ? implode('', $content) : $content;
+ return $this->toHtmlString('<' . $tag . $this->attributes($attributes) . '>' . $this->toHtmlString($content) . '' . $tag . '>');
+ }
+
+ /**
+ * Transform the string to an Html serializable object
+ *
+ * @param $html
+ *
+ * @return \Illuminate\Support\HtmlString
+ */
+ protected function toHtmlString($html)
+ {
+ return new HtmlString($html);
+ }
+
+ /**
+ * Dynamically handle calls to the class.
+ *
+ * @param string $method
+ * @param array $parameters
+ *
+ * @return \Illuminate\Contracts\View\View|mixed
+ *
+ * @throws \BadMethodCallException
+ */
+ public function __call($method, $parameters)
+ {
+ if (static::hasComponent($method)) {
+ return $this->componentCall($method, $parameters);
+ }
+
+ if (static::hasMacro($method)) {
+ return $this->macroCall($method, $parameters);
+ }
+
+ throw new BadMethodCallException("Method {$method} does not exist.");
+ }
+}
diff --git a/vendor/laravelcollective/html/src/HtmlFacade.php b/vendor/laravelcollective/html/src/HtmlFacade.php
new file mode 100644
index 00000000..127cdc82
--- /dev/null
+++ b/vendor/laravelcollective/html/src/HtmlFacade.php
@@ -0,0 +1,22 @@
+registerHtmlBuilder();
+
+ $this->registerFormBuilder();
+
+ $this->app->alias('html', HtmlBuilder::class);
+ $this->app->alias('form', FormBuilder::class);
+
+ $this->registerBladeDirectives();
+ }
+
+ /**
+ * Register the HTML builder instance.
+ *
+ * @return void
+ */
+ protected function registerHtmlBuilder()
+ {
+ $this->app->singleton('html', function ($app) {
+ return new HtmlBuilder($app['url'], $app['view']);
+ });
+ }
+
+ /**
+ * Register the form builder instance.
+ *
+ * @return void
+ */
+ protected function registerFormBuilder()
+ {
+ $this->app->singleton('form', function ($app) {
+ $form = new FormBuilder($app['html'], $app['url'], $app['view'], $app['session.store']->token(), $app['request']);
+
+ return $form->setSessionStore($app['session.store']);
+ });
+ }
+
+ /**
+ * Register Blade directives.
+ *
+ * @return void
+ */
+ protected function registerBladeDirectives()
+ {
+ $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) {
+ $namespaces = [
+ 'Html' => get_class_methods(HtmlBuilder::class),
+ 'Form' => get_class_methods(FormBuilder::class),
+ ];
+
+ foreach ($namespaces as $namespace => $methods) {
+ foreach ($methods as $method) {
+ if (in_array($method, $this->directives)) {
+ $snakeMethod = Str::snake($method);
+ $directive = strtolower($namespace).'_'.$snakeMethod;
+
+ $bladeCompiler->directive($directive, function ($expression) use ($namespace, $method) {
+ return "";
+ });
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * Get the services provided by the provider.
+ *
+ * @return array
+ */
+ public function provides()
+ {
+ return ['html', 'form', HtmlBuilder::class, FormBuilder::class];
+ }
+}
diff --git a/vendor/laravelcollective/html/src/helpers.php b/vendor/laravelcollective/html/src/helpers.php
new file mode 100644
index 00000000..14f03610
--- /dev/null
+++ b/vendor/laravelcollective/html/src/helpers.php
@@ -0,0 +1,70 @@
+link($url, $title, $attributes, $secure, $escape);
+ }
+}
+
+if (! function_exists('link_to_asset')) {
+ /**
+ * Generate a HTML link to an asset.
+ *
+ * @param string $url
+ * @param string $title
+ * @param array $attributes
+ * @param bool $secure
+ *
+ * @return string
+ */
+ function link_to_asset($url, $title = null, $attributes = [], $secure = null)
+ {
+ return app('html')->linkAsset($url, $title, $attributes, $secure);
+ }
+}
+
+if (! function_exists('link_to_route')) {
+ /**
+ * Generate a HTML link to a named route.
+ *
+ * @param string $name
+ * @param string $title
+ * @param array $parameters
+ * @param array $attributes
+ *
+ * @return string
+ */
+ function link_to_route($name, $title = null, $parameters = [], $attributes = [])
+ {
+ return app('html')->linkRoute($name, $title, $parameters, $attributes);
+ }
+}
+
+if (! function_exists('link_to_action')) {
+ /**
+ * Generate a HTML link to a controller action.
+ *
+ * @param string $action
+ * @param string $title
+ * @param array $parameters
+ * @param array $attributes
+ *
+ * @return string
+ */
+ function link_to_action($action, $title = null, $parameters = [], $attributes = [])
+ {
+ return app('html')->linkAction($action, $title, $parameters, $attributes);
+ }
+}