lundi 8 février 2021

Call to a member function getMessage() on string using laravel

routes.php

Route::get('/portal/register', 'PortalController@register');
Route::post('/portal/register/postformdata', ['as' => 'portal.register.post', 'uses' => 'PortalController@postformdata']);

PortalController.php

public function postformdata(Request $request)
{
    echo $request->user_name;
}

register.blade.php

       
    <h1>Registration: </h1> <h2>Please fill your information</h2>
    
    <input type="submit" class="submit" id="login-button1" name="login-button" value="Submit"/>

In above I am simply post request on PortalController function i.e. postformdata. Now, What happen when I click on submit button I have got an error as shown below in image.

enter image description here

So, How can I fix this issue? Please help me.

Thank You



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire