Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add redirectRoute and redirectAction helpers #145

Merged
merged 1 commit into from Aug 7, 2019

Conversation

@faustbrian
Copy link
Contributor

commented Aug 7, 2019

1️⃣ Is this something that is wanted/needed? Did you create a feature-request issue first?
Yes #140

2️⃣ Does it contain multiple, unrelated changes? Please separate the PRs out.
No

3️⃣ Does it include tests if possible? (Not a deal-breaker, just a nice-to-have)
Yes

4️⃣ Please include a thorough description of the feature/fix and reasons why it's useful.
Adds the redirectRoute and redirectAction methods to provide a more convenient way of redirecting from inside components.

Route

// Before
$this->redirect(route('home'));

// After
$this->redirectRoute('home');

Action

// Before
$this->redirect(action('HomeController@index'));

// After
$this->redirectAction('HomeController@index');

Under the hood it supports the same arguments as the route and action functions.

5️⃣ Thanks for contributing! 🙌

@calebporzio

This comment has been minimized.

Copy link
Owner

commented Aug 7, 2019

Good PR, thanks!

@calebporzio calebporzio merged commit 4e538ae into calebporzio:master Aug 7, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@faustbrian faustbrian deleted the faustbrian:feat/redirect-helpers branch Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.