Which HTTP request should I use while using updateOrCreate() method in Laravel? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How do you make a HTTP request with C++?How to use java.net.URLConnection to fire and handle HTTP requestsHow to make HTTP POST web requestHow is an HTTP POST request made in node.js?HTTP GET Request in Node.js ExpressDoing HTTP requests FROM Laravel to an external APIHTTP Request in Swift with POST methodLaravel: Use the method updateOrCreate on polymorphic relationLaravel - updateOrCreate or a sync method?Which http request method should I use in Laravel routes?
Can the Flaming Sphere spell be rammed into multiple Tiny creatures that are in the same 5-foot square?
Dynamic filling of a region of a polar plot
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
How do I find out the mythology and history of my Fortress?
What makes a man succeed?
Girl Hackers - Logic Puzzle
Getting prompted for verification code but where do I put it in?
One-one communication
How does Belgium enforce obligatory attendance in elections?
What does Turing mean by this statement?
Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?
Putting class ranking in CV, but against dept guidelines
Strange behavior of Object.defineProperty() in JavaScript
Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?
Project Euler #1 in C++
Why can't I install Tomboy in Ubuntu Mate 19.04?
Lagrange four-squares theorem --- deterministic complexity
How do living politicians protect their readily obtainable signatures from misuse?
Should a wizard buy fine inks every time he want to copy spells into his spellbook?
What does it mean that physics no longer uses mechanical models to describe phenomena?
Is there public access to the Meteor Crater in Arizona?
preposition before coffee
What does this say in Elvish?
Random body shuffle every night—can we still function?
Which HTTP request should I use while using updateOrCreate() method in Laravel?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How do you make a HTTP request with C++?How to use java.net.URLConnection to fire and handle HTTP requestsHow to make HTTP POST web requestHow is an HTTP POST request made in node.js?HTTP GET Request in Node.js ExpressDoing HTTP requests FROM Laravel to an external APIHTTP Request in Swift with POST methodLaravel: Use the method updateOrCreate on polymorphic relationLaravel - updateOrCreate or a sync method?Which http request method should I use in Laravel routes?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm using updateOrCreate but should I use Post Http Request or Put request
while I'm using it?
laravel httprequest lumen
add a comment |
I'm using updateOrCreate but should I use Post Http Request or Put request
while I'm using it?
laravel httprequest lumen
You could use either. Laravel by default uses puts for an update and post for a create.
– wbrandt
Mar 8 at 22:15
I know that I can use any .. but what is proper ?
– Mohamed Emad
Mar 8 at 22:23
1
In supplement of my answer: I can recommend you Adam Wathan conference talk about organizing the controllers youtube.com/watch?v=MF0jFKvS4SI It's not a direct answer to your post but it help
– cbaconnier
Mar 12 at 10:27
Thanks a lot for your help @cbaconnier
– Mohamed Emad
Mar 12 at 19:02
add a comment |
I'm using updateOrCreate but should I use Post Http Request or Put request
while I'm using it?
laravel httprequest lumen
I'm using updateOrCreate but should I use Post Http Request or Put request
while I'm using it?
laravel httprequest lumen
laravel httprequest lumen
asked Mar 8 at 22:07
Mohamed EmadMohamed Emad
329215
329215
You could use either. Laravel by default uses puts for an update and post for a create.
– wbrandt
Mar 8 at 22:15
I know that I can use any .. but what is proper ?
– Mohamed Emad
Mar 8 at 22:23
1
In supplement of my answer: I can recommend you Adam Wathan conference talk about organizing the controllers youtube.com/watch?v=MF0jFKvS4SI It's not a direct answer to your post but it help
– cbaconnier
Mar 12 at 10:27
Thanks a lot for your help @cbaconnier
– Mohamed Emad
Mar 12 at 19:02
add a comment |
You could use either. Laravel by default uses puts for an update and post for a create.
– wbrandt
Mar 8 at 22:15
I know that I can use any .. but what is proper ?
– Mohamed Emad
Mar 8 at 22:23
1
In supplement of my answer: I can recommend you Adam Wathan conference talk about organizing the controllers youtube.com/watch?v=MF0jFKvS4SI It's not a direct answer to your post but it help
– cbaconnier
Mar 12 at 10:27
Thanks a lot for your help @cbaconnier
– Mohamed Emad
Mar 12 at 19:02
You could use either. Laravel by default uses puts for an update and post for a create.
– wbrandt
Mar 8 at 22:15
You could use either. Laravel by default uses puts for an update and post for a create.
– wbrandt
Mar 8 at 22:15
I know that I can use any .. but what is proper ?
– Mohamed Emad
Mar 8 at 22:23
I know that I can use any .. but what is proper ?
– Mohamed Emad
Mar 8 at 22:23
1
1
In supplement of my answer: I can recommend you Adam Wathan conference talk about organizing the controllers youtube.com/watch?v=MF0jFKvS4SI It's not a direct answer to your post but it help
– cbaconnier
Mar 12 at 10:27
In supplement of my answer: I can recommend you Adam Wathan conference talk about organizing the controllers youtube.com/watch?v=MF0jFKvS4SI It's not a direct answer to your post but it help
– cbaconnier
Mar 12 at 10:27
Thanks a lot for your help @cbaconnier
– Mohamed Emad
Mar 12 at 19:02
Thanks a lot for your help @cbaconnier
– Mohamed Emad
Mar 12 at 19:02
add a comment |
1 Answer
1
active
oldest
votes
We doesn't know your architecture so it's difficult to give you an appropriate answer.
But, speaking in general termes, A CRUD use the methods as follow:
GET index()
GET create()
POST store()
GET edit($id)
PATCH update($id)
DELETE destroy($id)
In your scenario, I assume you doesn't know the ID of your resource.
In that case it can't be a PATCH (or PUT). The left over would be POST.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071660%2fwhich-http-request-should-i-use-while-using-updateorcreate-method-in-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
We doesn't know your architecture so it's difficult to give you an appropriate answer.
But, speaking in general termes, A CRUD use the methods as follow:
GET index()
GET create()
POST store()
GET edit($id)
PATCH update($id)
DELETE destroy($id)
In your scenario, I assume you doesn't know the ID of your resource.
In that case it can't be a PATCH (or PUT). The left over would be POST.
add a comment |
We doesn't know your architecture so it's difficult to give you an appropriate answer.
But, speaking in general termes, A CRUD use the methods as follow:
GET index()
GET create()
POST store()
GET edit($id)
PATCH update($id)
DELETE destroy($id)
In your scenario, I assume you doesn't know the ID of your resource.
In that case it can't be a PATCH (or PUT). The left over would be POST.
add a comment |
We doesn't know your architecture so it's difficult to give you an appropriate answer.
But, speaking in general termes, A CRUD use the methods as follow:
GET index()
GET create()
POST store()
GET edit($id)
PATCH update($id)
DELETE destroy($id)
In your scenario, I assume you doesn't know the ID of your resource.
In that case it can't be a PATCH (or PUT). The left over would be POST.
We doesn't know your architecture so it's difficult to give you an appropriate answer.
But, speaking in general termes, A CRUD use the methods as follow:
GET index()
GET create()
POST store()
GET edit($id)
PATCH update($id)
DELETE destroy($id)
In your scenario, I assume you doesn't know the ID of your resource.
In that case it can't be a PATCH (or PUT). The left over would be POST.
answered Mar 8 at 22:27
cbaconniercbaconnier
1,3591925
1,3591925
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071660%2fwhich-http-request-should-i-use-while-using-updateorcreate-method-in-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You could use either. Laravel by default uses puts for an update and post for a create.
– wbrandt
Mar 8 at 22:15
I know that I can use any .. but what is proper ?
– Mohamed Emad
Mar 8 at 22:23
1
In supplement of my answer: I can recommend you Adam Wathan conference talk about organizing the controllers youtube.com/watch?v=MF0jFKvS4SI It's not a direct answer to your post but it help
– cbaconnier
Mar 12 at 10:27
Thanks a lot for your help @cbaconnier
– Mohamed Emad
Mar 12 at 19:02