Answer the question
In order to leave comments, you need to log in
How is it architecturally correct in Laravel to design a method that is called both through the action of the controller and through ajax?
Hello.
Prompt, please, on the following question:
There is a ready project in which there is an action:
[email protected]
Action marks news in a DB for certain needs.
public function makeRevision(){
$ids = $request->input('ids');
$news = News::whereIn('id', $ids)->get();
... некая логика и заполнение БД ...
Session::flash('status', 'Complete');
return back();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question