Laravel route after post in same page "" -


we using laravel, have form post on "/",

$router->get('/', 'appcontroller@show');

the form script appear through modal window, once post form uses route:

$router->post('/', 'appcontroller@store');

and function

public function store() {     return view('app');  } 

how can stay on page without return action after post ?

with current method reloads "/" page,

are there way keep "/" page without reloading after submit button?

apologise english, hope understand our issue.

thanks in advance,

you need make ajax call resource. can with plain javascript or can use jquery this. $.post('/').

dependant on version, version 5.4 has covenant axios.post method can use vue send ajax requests.

for simple app jquery may best simple option you.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -