From d316b457196164b2df55547b324fed026791b3fa Mon Sep 17 00:00:00 2001 From: Melek REBAI Date: Fri, 25 Jan 2019 11:07:59 +0100 Subject: [PATCH 1/6] [5.7] Simplify method, no need for if --- src/Eloquent/FormAccessible.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Eloquent/FormAccessible.php b/src/Eloquent/FormAccessible.php index 0afd17e..ff7866e 100644 --- a/src/Eloquent/FormAccessible.php +++ b/src/Eloquent/FormAccessible.php @@ -69,11 +69,7 @@ trait FormAccessible */ public function isNestedModel($key) { - if (in_array($key, array_keys($this->getRelations()))) { - return true; - } - - return false; + return in_array($key, array_keys($this->getRelations())); } /** From 2fc07eeaa4923a2681e65c1171bb3c1ba467c41e Mon Sep 17 00:00:00 2001 From: Ibrahim Al Naz Rana Date: Thu, 28 Feb 2019 13:25:36 +0600 Subject: [PATCH 2/6] Remove deprecated helper function and use Facade instead --- src/Componentable.php | 3 ++- src/FormBuilder.php | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Componentable.php b/src/Componentable.php index a0a364b..9a227d0 100644 --- a/src/Componentable.php +++ b/src/Componentable.php @@ -3,6 +3,7 @@ namespace Collective\Html; use BadMethodCallException; +use Illuminate\Support\Arr; use Illuminate\Support\HtmlString; trait Componentable @@ -81,7 +82,7 @@ trait Componentable $default = null; } - $data[$variable] = array_get($arguments, $i, $default); + $data[$variable] = Arr::get($arguments, $i, $default); $i++; } diff --git a/src/FormBuilder.php b/src/FormBuilder.php index f28aaba..7889ac7 100644 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -9,6 +9,7 @@ use Illuminate\Contracts\Session\Session; use Illuminate\Contracts\View\Factory; use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull; use Illuminate\Http\Request; +use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Facades\App; use Illuminate\Support\HtmlString; @@ -134,7 +135,7 @@ class FormBuilder */ public function open(array $options = []) { - $method = array_get($options, 'method', 'post'); + $method = Arr::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 @@ -159,7 +160,7 @@ class FormBuilder // is used to spoof requests for this PUT, PATCH, etc. methods on forms. $attributes = array_merge( - $attributes, array_except($options, $this->reserved) + $attributes, Arr::except($options, $this->reserved) ); @@ -589,9 +590,9 @@ class FormBuilder // 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); + $cols = Arr::get($options, 'cols', 50); - $rows = array_get($options, 'rows', 10); + $rows = Arr::get($options, 'rows', 10); return array_merge($options, compact('cols', 'rows')); } From 7b8080c43ab49511bf11570e41874717548436b2 Mon Sep 17 00:00:00 2001 From: Ibrahim Al Naz Rana Date: Thu, 28 Feb 2019 13:26:01 +0600 Subject: [PATCH 3/6] Update for for laravel 5.8 --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index c43f0b8..b06c3e5 100755 --- a/composer.json +++ b/composer.json @@ -19,14 +19,14 @@ ], "require": { "php": ">=7.1.3", - "illuminate/http": "5.7.*", - "illuminate/routing": "5.7.*", - "illuminate/session": "5.7.*", - "illuminate/support": "5.7.*", - "illuminate/view": "5.7.*" + "illuminate/http": "5.8.*", + "illuminate/routing": "5.8.*", + "illuminate/session": "5.8.*", + "illuminate/support": "5.8.*", + "illuminate/view": "5.8.*" }, "require-dev": { - "illuminate/database": "5.7.*", + "illuminate/database": "5.8.*", "mockery/mockery": "~1.0", "phpunit/phpunit": "~7.1" }, From b6208070ed34e48a285cc23394dce1fd66b950f8 Mon Sep 17 00:00:00 2001 From: Ibrahim Al Naz Rana Date: Fri, 1 Mar 2019 18:35:49 +0600 Subject: [PATCH 4/6] Update laravel 5.8 --- composer.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index b06c3e5..7d589ce 100755 --- a/composer.json +++ b/composer.json @@ -1,13 +1,17 @@ { - "name": "laravelcollective/html", + "name": "ranabd36/laravelcollective", "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" + "issues": "https://github.com/ranabd36/laravelcollective/issues", + "source": "https://github.com/ranabd36/laravelcollective" }, "authors": [ + { + "name" : "Ibrahim Rana", + "email" : "ranabd36@gmail.com" + }, { "name": "Adam Engebretson", "email": "adam@laravelcollective.com" @@ -40,7 +44,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.7-dev" + "dev-master": "5.8-dev" }, "laravel": { "providers": [ From f83bc503a6999a8c98da7ff9cf0cd95143dbde10 Mon Sep 17 00:00:00 2001 From: "Moh. Ibrahim Al Naz Rana" Date: Fri, 1 Mar 2019 19:05:08 +0600 Subject: [PATCH 5/6] Update readme.md --- readme.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 4d3d9e1..e631008 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,15 @@ # Forms & HTML -[![Build Status](https://travis-ci.org/LaravelCollective/html.svg)](https://travis-ci.org/LaravelCollective/html) -[![Total Downloads](https://poser.pugx.org/LaravelCollective/html/downloads)](https://packagist.org/packages/laravelcollective/html) -[![Latest Stable Version](https://poser.pugx.org/LaravelCollective/html/v/stable.svg)](https://packagist.org/packages/laravelcollective/html) -[![Latest Unstable Version](https://poser.pugx.org/LaravelCollective/html/v/unstable.svg)](https://packagist.org/packages/laravelcollective/html) -[![License](https://poser.pugx.org/LaravelCollective/html/license.svg)](https://packagist.org/packages/laravelcollective/html) +[![Total Downloads](https://poser.pugx.org/ranabd36/laravelcollective/downloads)](https://packagist.org/packages/ranabd36/laravelcollective) +[![Latest Stable Version](https://poser.pugx.org/ranabd36/laravelcollective/v/stable)](https://packagist.org/packages/ranabd36/laravelcollective) +[![Latest Unstable Version](https://poser.pugx.org/ranabd36/laravelcollective/v/unstable)](https://packagist.org/packages/ranabd36/laravelcollective) +[![License](https://poser.pugx.org/ranabd36/laravelcollective/license)](https://packagist.org/packages/ranabd36/laravelcollective) Official documentation for Forms & Html for The Laravel Framework can be found at the [LaravelCollective](http://laravelcollective.com) website. + + +## Installation + +``` +composer require ranabd36/laravelcollective +``` From d1999f8dec310f6630dd8c22cacdeb4069b1bc2c Mon Sep 17 00:00:00 2001 From: Ibrahim Al Naz Rana Date: Fri, 1 Mar 2019 22:22:04 +0600 Subject: [PATCH 6/6] Update laravel 5.8 --- composer.json | 12 ++++-------- readme.md | 16 +++++----------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 7d589ce..b06c3e5 100755 --- a/composer.json +++ b/composer.json @@ -1,17 +1,13 @@ { - "name": "ranabd36/laravelcollective", + "name": "laravelcollective/html", "description": "HTML and Form Builders for the Laravel Framework", "license": "MIT", "homepage": "https://laravelcollective.com", "support": { - "issues": "https://github.com/ranabd36/laravelcollective/issues", - "source": "https://github.com/ranabd36/laravelcollective" + "issues": "https://github.com/LaravelCollective/html/issues", + "source": "https://github.com/LaravelCollective/html" }, "authors": [ - { - "name" : "Ibrahim Rana", - "email" : "ranabd36@gmail.com" - }, { "name": "Adam Engebretson", "email": "adam@laravelcollective.com" @@ -44,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.8-dev" + "dev-master": "5.7-dev" }, "laravel": { "providers": [ diff --git a/readme.md b/readme.md index e631008..4d3d9e1 100644 --- a/readme.md +++ b/readme.md @@ -1,15 +1,9 @@ # Forms & HTML -[![Total Downloads](https://poser.pugx.org/ranabd36/laravelcollective/downloads)](https://packagist.org/packages/ranabd36/laravelcollective) -[![Latest Stable Version](https://poser.pugx.org/ranabd36/laravelcollective/v/stable)](https://packagist.org/packages/ranabd36/laravelcollective) -[![Latest Unstable Version](https://poser.pugx.org/ranabd36/laravelcollective/v/unstable)](https://packagist.org/packages/ranabd36/laravelcollective) -[![License](https://poser.pugx.org/ranabd36/laravelcollective/license)](https://packagist.org/packages/ranabd36/laravelcollective) +[![Build Status](https://travis-ci.org/LaravelCollective/html.svg)](https://travis-ci.org/LaravelCollective/html) +[![Total Downloads](https://poser.pugx.org/LaravelCollective/html/downloads)](https://packagist.org/packages/laravelcollective/html) +[![Latest Stable Version](https://poser.pugx.org/LaravelCollective/html/v/stable.svg)](https://packagist.org/packages/laravelcollective/html) +[![Latest Unstable Version](https://poser.pugx.org/LaravelCollective/html/v/unstable.svg)](https://packagist.org/packages/laravelcollective/html) +[![License](https://poser.pugx.org/LaravelCollective/html/license.svg)](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. - - -## Installation - -``` -composer require ranabd36/laravelcollective -```