I’m using carbon to get today’s date and format it in a laravel blade template, which is not a problem at all, but when it comes to incrementing I’m having an issue I’m currently testing with just adding a single day, but I want to actually create table headers for today and the next 7 days. In my blade I
Is it possible to refresh a php site when a post request is detected? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question Let say a sensor is sending data to my php-dashboard via post requests. Is it possible to update them live on
How to call PHP script from Mulesoft?
I am in process creating resource/api in Mulesoft and this need to run some PHP script. If I use engine as “php” am getting below error – “Scripting engine ‘php’ not found. Available engines are: Oracle Nashorn” So, how to enable php engine? Answer PHP is not a valid scripting language for the Java scripting engine, also known as JSR233
While loop on multi-dimensional array
So I have a function that currently has a foreach and it works amazing, but I’m being forced to change it to a while loop: PLEASE NOTE: The developers at my company don’t want to use the foreach and they think that a while loop would be more efficient, but I’m not understanding how that would be executed, so I
How to get class from a constant array?
I have about twenty different classes that are segregated in an assoc array similar to this: But now I want to do the array constant. I can make it using const VAL = array(); just fine. The problem lies in making new objects using those classes fails with Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ error. I figured that
HLS/m3u8 stream checker for a LIVE badge/image
Hey everybody how are you doing. I have a small but for me a headache question. In short. I want to show a ”LIVE” badge/image if a HLS/m3u8 stream is active. If somebody know’s how to achieve this, i would really appreciate it. Tried to google it but im clueless when it comes to implementing ”custom” code. It’s for a
Laravel 8.53 – Routing doesnt work on any of pages
Solution The solution was found thanks to @Gert B. Simply add to your Laravel application any virtual host (I added for mine) laravel1.test How to add Virtual host: Go to C:WindowsSystem32driversetchosts add line: 127.0.0.1 laravel1.test (or your virtual host name) And add this to your vhosts(in case of using xampp) in C:xamppapacheconfextra httpd-vhosts I can’t pass the problem with routing
Laravel find rows by nested relationship column
I have 2 tables reserves and chats, chats belongTo reserves and I want to get all chats where chat.reserve.user_id = Auth::id(). How can I do that in laravel. Answer I don`t know your models name (need more code in question), but try use where ‘reserves’ your relationship and have field user_id. Maybe needed full path to field like ‘reserves’.’user_id’ Also
Determine name of table referenced by a foreign key from another table using PHP?
Just learning mysql and php and having to create a test project for my exam. How do I determine the name of a table (target) a foreign key from another table (source) references, and how would I go about that with PHP? I have been googling this as well as browsing SO for it for hours, but have not found
How to display thumbnail image from custom post type in another post type?
I have two custom post types “book” and “author”. I want to display author’s thumbnail in book’s post card. I think here should be loop inside the loop, but don’t understand how to implement it. Answer If you use ACF with Post Object field type, change your <– author thumbnail –> section with the following code don’t forget to change