Skip to content

Laravel 8 redirect web routes

It seems there is an error in my Laravel 8 routes somewhere. My web routes file: When going to /, it is redirected to /en. But when going to /dashboard it isn’t redirected to /dashboard/en but gives an error: As can be seen, not a lot of information given. Anyone knows what to do? Answer Found it: Larav…

Method followed by colon and a question mark and a class

Strange, but couldn’t find this on SO, maybe someone can help. What does this syntax mean in PHP when we have a colon followed by a question mark and then another class name when a method is being defined? Full function just in case with oriignal names Answer This syntax means that the method is forced …

Swagger: swagger.json interface

i tried to work with marketplace. They said that “Working with the API consists of sending a request and receiving a response. To do this, you can use the console to the right of the method descriptions, the Swagger interface” Also, the link of “Swagger interface” => https://api-sel…

Filter HTML Table using JavaScript – textContent Error

Desired Result: Input data from a .csv file into PHP. Take the data from the .csv file and store into an array. Store the array into an HTML table using PHP. Use a search engine to filter through the rows using JavaScript. I am getting the following error in the JavaScript: Uncaught TypeError: Cannot read pro…

Remove duplicated words between two and more string texts in PHP

Words: In this words i want to remove “My Subject”, the end of the day words should replaced like: My subject can be dynamically change it can be three word or four word. Is it possible to remove first duplicated words from string? Thank you. Answer You could find the duplicate words by splitting …

Calculate foreach group in loop by 3 PHP

Hope you are doing great! Please have an idea of ​​a comment grouped by 3, then the 4th to receive the value of the grouped in a month. This my dat below : I tryed this code : Sum Value in foreach loop every 3 time looping But i don’t know specify the 4th with the sum, to loop in