Skip to content

Combine neighbouring elemets to new array of min 2

I have a quite specific problem. I want to combine every element of an array with neighboring elements to a new array of minimum length 2. Im not sure if Im explaining that correctly so here’s an example: Given the array: I want to create a new array that looks like this: [‘abcd’] is not ret…

PHP topological sort

LIST: controller name => priority:required controllers sorted and expected output: First sort by priority, then reorder based on required controllers to be loaded before. ensure not to be stuck in an infinite loop due to controllers requiring each other. I assume I’ll need something like this: Please…

laravel run command / cron every 7 seconds on sunday

So i would like to accomplish the a command which runs every sunday but also every 7 seconds on that sunday. The following is from the docs but I don’t have an idea on how to achieve this. Anyone able …

The cookie is not created js

I’m planning a registration system. Right now I’m trying to send a randomly generated session string to the mysql db; besides sending it on db I want to create a cookie with the js that contains the session string. I tried with the following code but I don’t know why the cookie is not genera…

Laravel cannot be installed with php 8 [closed]

Hello I am going to create a project with laravel, I am using composer global installer, with the php version I am using is php 8. but I have a problem when I do the laravel installation. What should …

Pass GET Variable to Modal to use in Query

I am trying to build a budget lookup tool. I have form where someone enters an account#, fund#, and deptID#. When they hit search, it opens a modal and will display a table of the budget balances that match the entered fund, account, and deptID. I can get the modal to open but, I can’t seem to get the d…

Search query function on Laravel

I have an album that has images. I’m having a problem with doing the search function. I want to search for photos with the following caption. Here’s what I did so far. Albums table: | id | album_name |…