Skip to content
Advertisement

Adding day/incrementing with a carbon formatted date

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

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

Advertisement