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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현