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;
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
add a comment |
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 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();
beforereturn
.
– Tpojka
Mar 23 at 23:26
add a comment |
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
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
php laravel
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();
beforereturn
.
– Tpojka
Mar 23 at 23:26
add a comment |
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();
beforereturn
.
– 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
add a comment |
1 Answer
1
active
oldest
votes
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') ">
This worked, thank you
– idontunderstandarrays
Mar 24 at 21:50
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%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
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') ">
This worked, thank you
– idontunderstandarrays
Mar 24 at 21:50
add a comment |
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') ">
This worked, thank you
– idontunderstandarrays
Mar 24 at 21:50
add a comment |
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') ">
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') ">
answered Mar 23 at 21:30
Mohammad bMohammad b
1,75621835
1,75621835
This worked, thank you
– idontunderstandarrays
Mar 24 at 21:50
add a comment |
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
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%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
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
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();
beforereturn
.– Tpojka
Mar 23 at 23:26