Can you format and punctuate your question(s) so it is easily readable? It is an unreadable mass of words right now.
How to simplify code with routes in laravel?
I'll try to explain as best I can. We know that route files can only be executed inside php files but I wanted to call them inside a javascript file using the ajax inside. Another thing, let's say I have a blade file that will have a variable that can only be used within the file that the route refers to. otherwise it will give "not found" but I wanted to run it inside an ajax file also inside a javascript-only file I'll explain once again we have the default blade file called main it will load in addition to all the configuration of the pages the functions by javascript but these javascript requests inside a php is ugly and bad. need to be inside a js file. in addition to the route not being found outside of a blade file, I don't know if you understood well
@tykus I don't think so.. a json encode?
Please or to participate in this conversation.