From 7692a9e3a4ef07e3fca7cba99171e157df8242f9 Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Mon, 31 Jul 2017 14:57:01 +0100 Subject: [PATCH 1/2] Bump arcanesoft/auth package version + Renaming the `getValidatedInputs` --- composer.json | 2 +- src/Http/Controllers/Admin/FootersController.php | 4 ++-- src/Http/Controllers/Admin/MetasController.php | 2 +- src/Http/Controllers/Admin/PagesController.php | 4 ++-- src/Http/Controllers/Admin/RedirectsController.php | 6 +++--- src/Http/Requests/Admin/Footers/FooterFormRequest.php | 2 +- src/Http/Requests/Admin/Pages/PageFormRequest.php | 2 +- src/Http/Requests/Admin/Redirects/RedirectFormRequest.php | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 74f8b7d..5fe96da 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": ">=5.6.4", "arcanedev/laravel-seo": "~0.5", "arcanedev/spam-blocker": "~1.3", - "arcanesoft/auth": "~2.2", + "arcanesoft/auth": "~3.0", "arcanesoft/core": "~2.4" }, "require-dev": { diff --git a/src/Http/Controllers/Admin/FootersController.php b/src/Http/Controllers/Admin/FootersController.php index 7f2045a..21d7145 100644 --- a/src/Http/Controllers/Admin/FootersController.php +++ b/src/Http/Controllers/Admin/FootersController.php @@ -75,7 +75,7 @@ public function store(CreateFooterRequest $request) $this->authorize(Policies\FootersPolicy::PERMISSION_CREATE); $footer = Footer::createOne( - $request->getValidatedInputs() + $request->getValidatedData() ); $this->transNotification('created', ['name' => $footer->name], $footer->toArray()); @@ -115,7 +115,7 @@ public function update(Footer $footer, UpdateFooterRequest $request) $this->authorize(Policies\FootersPolicy::PERMISSION_UPDATE); $footer->updateOne( - $request->getValidatedInputs() + $request->getValidatedData() ); $this->transNotification('updated', ['name' => $footer->name], $footer->toArray()); diff --git a/src/Http/Controllers/Admin/MetasController.php b/src/Http/Controllers/Admin/MetasController.php index 573b8e8..2cd5494 100644 --- a/src/Http/Controllers/Admin/MetasController.php +++ b/src/Http/Controllers/Admin/MetasController.php @@ -38,7 +38,7 @@ public function index() { $this->authorize(Policies\MetasPolicy::PERMISSION_LIST); - $metas = Meta::paginate(50); + $metas = Meta::query()->paginate(50); $this->setTitle($title = trans('seo::metas.titles.metas-list')); $this->addBreadcrumb($title); diff --git a/src/Http/Controllers/Admin/PagesController.php b/src/Http/Controllers/Admin/PagesController.php index be3ec72..7470e15 100644 --- a/src/Http/Controllers/Admin/PagesController.php +++ b/src/Http/Controllers/Admin/PagesController.php @@ -72,7 +72,7 @@ public function store(CreatePageRequest $request) $this->authorize(Policies\PagesPolicy::PERMISSION_CREATE); $page = Page::createOne( - $request->getValidatedInputs() + $request->getValidatedValidated() ); $this->transNotification('created', ['name' => $page->name], $page->toArray()); @@ -109,7 +109,7 @@ public function update(Page $page, UpdatePageRequest $request) $this->authorize(Policies\PagesPolicy::PERMISSION_UPDATE); $page->updateOne( - $request->getValidatedInputs() + $request->getValidatedValidated() ); $this->transNotification('updated', ['name' => $page->name], $page->toArray()); diff --git a/src/Http/Controllers/Admin/RedirectsController.php b/src/Http/Controllers/Admin/RedirectsController.php index 8095c41..510be33 100644 --- a/src/Http/Controllers/Admin/RedirectsController.php +++ b/src/Http/Controllers/Admin/RedirectsController.php @@ -53,7 +53,7 @@ public function index() { $this->authorize(RedirectsPolicy::PERMISSION_LIST); - $redirects = Redirect::paginate(50); + $redirects = Redirect::query()->paginate(50); $this->setTitle($title = trans('seo::redirects.titles.redirections-list')); $this->addBreadcrumb($title); @@ -90,7 +90,7 @@ public function store(CreateRedirectRequest $request) $this->authorize(RedirectsPolicy::PERMISSION_CREATE); $redirect = Redirect::createRedirect( - $request->getValidatedInputs() + $request->getValidatedData() ); $this->transNotification('created', [], $redirect->toArray()); @@ -146,7 +146,7 @@ public function update(Redirect $redirect, UpdateRedirectRequest $request) { $this->authorize(RedirectsPolicy::PERMISSION_UPDATE); - $redirect->update($request->getValidatedInputs()); + $redirect->update($request->getValidatedData()); $this->transNotification('updated', [], $redirect->toArray()); diff --git a/src/Http/Requests/Admin/Footers/FooterFormRequest.php b/src/Http/Requests/Admin/Footers/FooterFormRequest.php index ff6ebf5..1ca0275 100644 --- a/src/Http/Requests/Admin/Footers/FooterFormRequest.php +++ b/src/Http/Requests/Admin/Footers/FooterFormRequest.php @@ -21,7 +21,7 @@ abstract class FooterFormRequest extends FormRequest * * @return array */ - public function getValidatedInputs() + public function getValidatedData() { return $this->only([ // Footer inputs diff --git a/src/Http/Requests/Admin/Pages/PageFormRequest.php b/src/Http/Requests/Admin/Pages/PageFormRequest.php index f2f733f..59b57dc 100644 --- a/src/Http/Requests/Admin/Pages/PageFormRequest.php +++ b/src/Http/Requests/Admin/Pages/PageFormRequest.php @@ -20,7 +20,7 @@ abstract class PageFormRequest extends FormRequest * * @return array */ - public function getValidatedInputs() + public function getValidatedValidated() { return $this->only(['name', 'locale', 'content']); } diff --git a/src/Http/Requests/Admin/Redirects/RedirectFormRequest.php b/src/Http/Requests/Admin/Redirects/RedirectFormRequest.php index 4d1d3ad..7d566b8 100644 --- a/src/Http/Requests/Admin/Redirects/RedirectFormRequest.php +++ b/src/Http/Requests/Admin/Redirects/RedirectFormRequest.php @@ -23,7 +23,7 @@ abstract class RedirectFormRequest extends FormRequest * * @return array */ - public function getValidatedInputs() + public function getValidatedData() { return $this->only(['old_url', 'new_url', 'status']); } From 29a7bd9aaa0e4d0aef2aa55b6607b838784baf86 Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Mon, 31 Jul 2017 15:07:15 +0100 Subject: [PATCH 2/2] Cleaning unused use statement --- src/Models/Presenters/MetaPresenter.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Models/Presenters/MetaPresenter.php b/src/Models/Presenters/MetaPresenter.php index 67d8c59..c127ebb 100644 --- a/src/Models/Presenters/MetaPresenter.php +++ b/src/Models/Presenters/MetaPresenter.php @@ -1,7 +1,6 @@