I need to show a blade page for editting things from the main page. The problem is that I'm using Laravel for editing things without a Model, the things are not on my application databases.
In the main page I have all that I need for the "edit page" and I do not want to make another request to the "api server" to get again the data. -this means that a "GET" request with the "id" is not enough-
So I try to build a Link like that:
href="{{ URL::route('edit.txt', [$template->content->templateId,
'template'=>$template,
'src'=>$src])}}"
then I have the route:
Route::get('/editTxtStepper/{id}','HomeController@editTxtTemplate')->name('edit.txt');
Then I have a controller that does:
public function editTxtTemplate($idTemp,Request $r){
$src=$r->src;
$template=$r->template;
return view('editStepperHtml')->with('src',$src)->with('template',$template);
}
This is wrong because all the data going in to the URL and breaks some servers with the classic error:
Request-URI Too Long The requested URL's length exceeds the capacity limit for this server.
The next thing on my mind is to using a POST request, but is it correct if I'm using it to showing a next page?
Which one is the correct thing to do? I'm using even jQuery and ajax in the same project so if I need it for quick solutions no problem.