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 Routes #48 #54

Closed
wants to merge 9 commits into from
Closed

Add Routes #48 #54

wants to merge 9 commits into from

Conversation

chx2
Copy link
Contributor

@chx2 chx2 commented Mar 27, 2021

This PR will encompass all of the requirements listed in #48

  • Show an option in the config file that lists all the forms and the application can update it to exclude some from showing or add in their own forms to the config.
  • Add existing API routes & controllers
  • Add existing form routes, controllers, & views
  • Ensure support for dynamic form creation

return [

//This stores the forms that this package will generate routes for.
'active' => [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I figured just adding an array that stores a list of active forms, you can reference routes/api.php to see how form routes could then be dynamically generated. This is subject to change.

@chx2 chx2 added the question Further information is requested label Mar 29, 2021
@chx2
Copy link
Contributor Author

chx2 commented Mar 29, 2021

Need to figure out what $image refers to in the original controllers in TGER that need to be moved over. Not quite sure what those are referring to specifically. Examples below:

https://github.com/tger/tger/blob/dev/app/Http/Controllers/Web/Site/Pages/ContactController.php#L22
https://github.com/tger/tger/blob/dev/app/Http/Controllers/Web/Site/Pages/EmploymentController.php#L21
https://github.com/tger/tger/blob/dev/app/Http/Controllers/Web/Site/Pages/OnTheRunController.php#L22

@drewroberts any updates on what these relate to?

{
public function __invoke(Request $request, Market $market = null, Location $location = null)
{
$current = getCurrentMarket($request);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be moved to locations. If there, need to reference it?

return redirect()->to($market->contact_path);
}

setCurrentMarket($request, $market);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be moved to locations. If there, need to reference it?

]);
}

// Send to correct market if somehow they get to a URL with a different market than where the location belongs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drewroberts I'm assuming this is associated with TIPOFF/locations#85?

return redirect()->to($current->contact_path);
}

$image = Image::find(40)->url;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to figure out what this variable is associated with

@chx2
Copy link
Contributor Author

chx2 commented Apr 12, 2021

Going to close this and re-open a new request once the process of routing & views is mored defined in a few other packages.

@chx2 chx2 closed this Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE YET question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant