If you need to sum up all rows of a multidimensional array, be it an array of prices or posts or votes, in PHP you can do that like this: Result: […]
Read More… from Get the sum of all rows of a multidimensional array in PHP
If you need to sum up all rows of a multidimensional array, be it an array of prices or posts or votes, in PHP you can do that like this: Result: […]
Read More… from Get the sum of all rows of a multidimensional array in PHP
With this snippet you can show a static google map image for a specific location, which is linked to google maps and includes showing a marker in all views.Don’t forget to change YOUR_GOOGLE_STATIC_MAPS_API_KEY to your api key, which you can get at https://console.developers.google.com by creating a server key and aactivate google maps for this account. […]
Read More… from Show static google map image and link to map with marker
To show the content of a directory in PHP and make the files like images etc downloadable without changing the Webserver config, upload this snippet as index.php to the directory. <?php$pageURL = ‘https’;$pageURL .= “://”;$pageURL .= $_SERVER[“SERVER_NAME”];$httpfolder = $pageURL.$_SERVER[“REQUEST_URI”]; // The link to this folder from outside, with slash at end$dir = getcwd();$files = array_diff(scandir($dir), […]
Recently my Ubuntu server updated itself, and I suddenly had version PHP 8.0 on my terminal. I use PHP for composer installations, and some packages in my composer.json required PHP 7.4 and wouldn’t install with PHP 8. So I had to downgrade my PHP Version from PHP 8.0 to PHP 7.4 This is done like […]
Read More… from Downgrade Ubuntu PHP Version from PHP 8 to PHP 7.4
Problem: You use the famous https://github.com/spatie/laravel-google-fonts/, but on local development or laragon you get “blocked: mixed content”, when you call your app with HTTPS. Solution: […]
If you want to translate your laravel messages to different languages, you can do so in minutes with https://github.com/Laravel-Lang/lang It took me literally 1 minute to change my complete backend to german with this package. Kudos, guys, great job. […]
Read More… from Translate Laravel system messages and errors to different languages
I aways love dark mode on websites, since I come alive late when its already dark outside. And since I am a fellow Laravel user, I want my websites to have dark mode, too (not this one, of course, I’m lazy at home). I stumbled upon this post some time ago, and Klender (the author) […]
Problem: In Ubuntu 24.04 you see available updates, but the update fails with “cannot refresh snap-store”. This is a known logical problem due to the half-baked integration of the canonical snap store next to apt in ubuntu. The snap store is a snap package itself, so if you start it to update your snap packages, […]
Read More… from “Cannot refresh snap-store” Error when updating Ubuntu 24.04
Your OpenVPN config file is an old version, for OpenVPN >=2.6 you need to change cipher AES-256-CBC to data-ciphers AES-256-CBC in your client.conf If this is not possible, you can also try with the command line option –compat-mode 2.3.0 […]
Solution: Update the key with sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys B7B3B788A8D3785C […]
Read More… from NO_PUBKEY B7B3B788A8D3785C http://repo.mysql.com/apt/ubuntu/dists/focal/InRelease