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;








0















I'm using updateOrCreate but should I use Post Http Request or Put request while I'm using it?










share|improve this question






















  • 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

















0















I'm using updateOrCreate but should I use Post Http Request or Put request while I'm using it?










share|improve this question






















  • 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













0












0








0








I'm using updateOrCreate but should I use Post Http Request or Put request while I'm using it?










share|improve this question














I'm using updateOrCreate but should I use Post Http Request or Put request while I'm using it?







laravel httprequest lumen






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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












1 Answer
1






active

oldest

votes


















2














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.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    2














    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.






    share|improve this answer



























      2














      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.






      share|improve this answer

























        2












        2








        2







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 at 22:27









        cbaconniercbaconnier

        1,3591925




        1,3591925





























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support 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!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved