How to use update function in controller when I don't need extra parameters?Passing Route Parameters to Filters when Using RESTful ControllersHow To Pass GET Parameters To Laravel From With GET Method ?Pass parameters to '.index' controller function using Laravel resourceful routingScope undefined in Angulars with LaravelHow do I pass a parameter to a controller action within a Laravel Package?how to pass parameter to show() method in resource controller from another functionLaravel 5 Update action routes to the show function in controllerRedirecting with parameters to a controller in Laravel and picking up the parameters in the second controllerMissing required parameters for in a Update Form Laravel 5.2How to update mass record by user_id?

Sony VAIO Duo 13 Wifi not working on Ubuntu 16.04

(For training purposes) Are there any openings with rook pawns that are more effective than others (and if so, what are they)?

Ribbon Cable Cross Talk - Is there a fix after the fact?

Existence of a model of ZFC in which the natural numbers are really the natural numbers

Caught with my phone during an exam

If a character has cast the Fly spell on themselves, can they "hand off" to the Levitate spell without interruption?

Can someone provide me the list of SOQL exceptions?

How many wires should be in a new thermostat cable?

Download app bundles from App Store to run on iOS Emulator on Mac

why "American-born", not "America-born"?

Is a world with one country feeding everyone possible?

Shell builtin `printf` line limit?

What is the required burn to keep a satellite at a Lagrangian point?

Nunc est bibendum: gerund or gerundive?

Why is this python script running in background consuming 100 % CPU?

JavaScript: Access 'this' when calling function stored in variable

Is being an extrovert a necessary condition to be a manager?

Can someone get a spouse off a deed that never lived together and was incarcerated?

nginx conf: http2 module not working in Chrome in ubuntu 18.04

Team member is vehemently against code formatting

Managing heat dissipation in a magic wand

Why is a weak base more able to deprotonate a strong acid than a weak acid?

To exponential digit growth and beyond!

What happens when redirecting with 3>&1 1>/dev/null?



How to use update function in controller when I don't need extra parameters?


Passing Route Parameters to Filters when Using RESTful ControllersHow To Pass GET Parameters To Laravel From With GET Method ?Pass parameters to '.index' controller function using Laravel resourceful routingScope undefined in Angulars with LaravelHow do I pass a parameter to a controller action within a Laravel Package?how to pass parameter to show() method in resource controller from another functionLaravel 5 Update action routes to the show function in controllerRedirecting with parameters to a controller in Laravel and picking up the parameters in the second controllerMissing required parameters for in a Update Form Laravel 5.2How to update mass record by user_id?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm getting a Missing required parameters for [Route: profiel.update] [URI: profiel/profiel] error. But I don't need the parameter.



I'm calling my function like this



 <form class="form-signin" method="POST" action=" action('SettingsController@update') ">


And this is the update function in the controller



$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');


How can I still use this function?










share|improve this question






















  • share your route codes that contain SettingsController@update

    – Mohammad b
    Mar 23 at 21:17











  • @Mohammadb This is my route Route::resource('profiel', 'SettingsController');

    – idontunderstandarrays
    Mar 23 at 21:18











  • Did you create your controller using —resource ??

    – CodeBoyCode
    Mar 23 at 21:24











  • @CodeBoyCode I did it like this 'php artisan make:model Settings -mcr'

    – idontunderstandarrays
    Mar 23 at 21:29











  • $settings->save(); before return.

    – Tpojka
    Mar 23 at 23:26

















0















I'm getting a Missing required parameters for [Route: profiel.update] [URI: profiel/profiel] error. But I don't need the parameter.



I'm calling my function like this



 <form class="form-signin" method="POST" action=" action('SettingsController@update') ">


And this is the update function in the controller



$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');


How can I still use this function?










share|improve this question






















  • share your route codes that contain SettingsController@update

    – Mohammad b
    Mar 23 at 21:17











  • @Mohammadb This is my route Route::resource('profiel', 'SettingsController');

    – idontunderstandarrays
    Mar 23 at 21:18











  • Did you create your controller using —resource ??

    – CodeBoyCode
    Mar 23 at 21:24











  • @CodeBoyCode I did it like this 'php artisan make:model Settings -mcr'

    – idontunderstandarrays
    Mar 23 at 21:29











  • $settings->save(); before return.

    – Tpojka
    Mar 23 at 23:26













0












0








0








I'm getting a Missing required parameters for [Route: profiel.update] [URI: profiel/profiel] error. But I don't need the parameter.



I'm calling my function like this



 <form class="form-signin" method="POST" action=" action('SettingsController@update') ">


And this is the update function in the controller



$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');


How can I still use this function?










share|improve this question














I'm getting a Missing required parameters for [Route: profiel.update] [URI: profiel/profiel] error. But I don't need the parameter.



I'm calling my function like this



 <form class="form-signin" method="POST" action=" action('SettingsController@update') ">


And this is the update function in the controller



$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');


How can I still use this function?







php laravel






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 23 at 20:48









idontunderstandarraysidontunderstandarrays

8910




8910












  • share your route codes that contain SettingsController@update

    – Mohammad b
    Mar 23 at 21:17











  • @Mohammadb This is my route Route::resource('profiel', 'SettingsController');

    – idontunderstandarrays
    Mar 23 at 21:18











  • Did you create your controller using —resource ??

    – CodeBoyCode
    Mar 23 at 21:24











  • @CodeBoyCode I did it like this 'php artisan make:model Settings -mcr'

    – idontunderstandarrays
    Mar 23 at 21:29











  • $settings->save(); before return.

    – Tpojka
    Mar 23 at 23:26

















  • share your route codes that contain SettingsController@update

    – Mohammad b
    Mar 23 at 21:17











  • @Mohammadb This is my route Route::resource('profiel', 'SettingsController');

    – idontunderstandarrays
    Mar 23 at 21:18











  • Did you create your controller using —resource ??

    – CodeBoyCode
    Mar 23 at 21:24











  • @CodeBoyCode I did it like this 'php artisan make:model Settings -mcr'

    – idontunderstandarrays
    Mar 23 at 21:29











  • $settings->save(); before return.

    – Tpojka
    Mar 23 at 23:26
















share your route codes that contain SettingsController@update

– Mohammad b
Mar 23 at 21:17





share your route codes that contain SettingsController@update

– Mohammad b
Mar 23 at 21:17













@Mohammadb This is my route Route::resource('profiel', 'SettingsController');

– idontunderstandarrays
Mar 23 at 21:18





@Mohammadb This is my route Route::resource('profiel', 'SettingsController');

– idontunderstandarrays
Mar 23 at 21:18













Did you create your controller using —resource ??

– CodeBoyCode
Mar 23 at 21:24





Did you create your controller using —resource ??

– CodeBoyCode
Mar 23 at 21:24













@CodeBoyCode I did it like this 'php artisan make:model Settings -mcr'

– idontunderstandarrays
Mar 23 at 21:29





@CodeBoyCode I did it like this 'php artisan make:model Settings -mcr'

– idontunderstandarrays
Mar 23 at 21:29













$settings->save(); before return.

– Tpojka
Mar 23 at 23:26





$settings->save(); before return.

– Tpojka
Mar 23 at 23:26












1 Answer
1






active

oldest

votes


















1














As Laravel Document : Resource Controllers



you have to use parameter if you use resource controller



instead of resource, you can create another route



Route::post('profileupdate','SettingsController@upd')->name('profile_update');


and controller upd:



public function upd()

$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');



and change form action:



 <form class="form-signin" method="POST" action=" route('profile_update') ">





share|improve this answer























  • This worked, thank you

    – idontunderstandarrays
    Mar 24 at 21:50











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%2f55318228%2fhow-to-use-update-function-in-controller-when-i-dont-need-extra-parameters%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









1














As Laravel Document : Resource Controllers



you have to use parameter if you use resource controller



instead of resource, you can create another route



Route::post('profileupdate','SettingsController@upd')->name('profile_update');


and controller upd:



public function upd()

$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');



and change form action:



 <form class="form-signin" method="POST" action=" route('profile_update') ">





share|improve this answer























  • This worked, thank you

    – idontunderstandarrays
    Mar 24 at 21:50















1














As Laravel Document : Resource Controllers



you have to use parameter if you use resource controller



instead of resource, you can create another route



Route::post('profileupdate','SettingsController@upd')->name('profile_update');


and controller upd:



public function upd()

$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');



and change form action:



 <form class="form-signin" method="POST" action=" route('profile_update') ">





share|improve this answer























  • This worked, thank you

    – idontunderstandarrays
    Mar 24 at 21:50













1












1








1







As Laravel Document : Resource Controllers



you have to use parameter if you use resource controller



instead of resource, you can create another route



Route::post('profileupdate','SettingsController@upd')->name('profile_update');


and controller upd:



public function upd()

$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');



and change form action:



 <form class="form-signin" method="POST" action=" route('profile_update') ">





share|improve this answer













As Laravel Document : Resource Controllers



you have to use parameter if you use resource controller



instead of resource, you can create another route



Route::post('profileupdate','SettingsController@upd')->name('profile_update');


and controller upd:



public function upd()

$settings = Settings::where('user_id', Auth::user()->id);

$settings->taal = $request->input('taal');
$settings->valuta = $request->input('valuta');
return redirect('profiel');



and change form action:



 <form class="form-signin" method="POST" action=" route('profile_update') ">






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 23 at 21:30









Mohammad bMohammad b

1,75621835




1,75621835












  • This worked, thank you

    – idontunderstandarrays
    Mar 24 at 21:50

















  • This worked, thank you

    – idontunderstandarrays
    Mar 24 at 21:50
















This worked, thank you

– idontunderstandarrays
Mar 24 at 21:50





This worked, thank you

– idontunderstandarrays
Mar 24 at 21:50



















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%2f55318228%2fhow-to-use-update-function-in-controller-when-i-dont-need-extra-parameters%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

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?