Skip to content

PHP laravel Flash message is not showing

I am redirected to the desired page but success message is supposed to be shown there but there is no message has been shown. I have tried multiple methods online but there is something I missing. Controller File: Blade File: Answer Try this or there is another method called with() you can use it after redire…

Structure array into multi dimensional array

So I have the following variable $authenticated_users which returns: So I have the following method: When I echo $config I get the following results: Here is what I’m attempting to do: Does anyone know what I can do to improve my code? Answer you need to change your logic

PHP:: Double sort an array by priority

My goal is to sort an array first by the string length and after that sort it again by character value without changing the priority of the length. Here is my code: I am getting : …almost but not there) Answer You’re missing the logic to account for sorting by character value. You can add that log…

Building a variable covariance-table

I want to create a covariance-table that shows all possible combinations between 3-10 inputs. The image below shows a 11×11 table for 10 inputs, and a 4×4 table for 3 inputs. The user can choose anywhere between 3 and 10 inputs, and the table can therefore be in any size between those pictured. . Ma…

Reading CRUD wont show ” marks

I have created a CRUD system for a contact form. If i was to input speech marks (“”) it will not input anything after and including the speechmarks I use the VARCHAR datatype in the database and type=text in html Example In image 1. I have inputted symbols and standard text. This is fine. In image…

Create array from xml more objects with same name

Is there a way to create an array from xml file that will contain all of the <IMG_ALTERNATIVE> values so I can use them in my other function? The xml looks like this: I parse the xml this way in php: Answer use this code https://3v4l.org/0igDF

file_put_contents() store files outside the public folder laravel

Hi I am trying to save file inside public folder using this file_put_contents() but in local it working fine it save file in public folder but in live server it save outside the public folder. my local URL contains public word but live URL is without public word Thanks for any help Answer You did not declare …