October 21, 2024
Chicago 12, Melborne City, USA
PHP

How do delivery systems like Uber Eats and Glovo manage order assignment, confirmation, and real-time courier location updates?

I’m curious about the backend mechanisms behind popular delivery platforms like Uber Eats, Glovo, or similar services. Specifically, I’m interested in understanding how these systems handle: Order Assignment: How do they assign an incoming order to a specific courier? What kind of algorithms or criteria are typically used to decide which courier should receive the

Read More
PHP

I can't pass data to the component in Laravel

I’m trying to pass data to the components using directly to the Blade component (using @props). As a first step I put the following code in notification.blade.php: @props([ 'type' => 'info', 'message' ]) <div class="alert alert-{{ $type }} notification"> {{ $message }} </div> Now in the test.blade.php view I put the following code (:type and

Read More
PHP

“could not find driver” Error with SQL Server on WSL 2 with Ubuntu 24.04

I’m encountering an issue while trying to connect my Laravel application to a SQL Server database. I’m running this setup on WSL 2 with Ubuntu 24.04 and PHP 8.3.11. Here’s a detailed overview of the problem and what I’ve done so far: Installed Microsoft ODBC Driver for Ubuntu: I followed the official instructions to install

Read More
PHP

Custom Post Type pagination not working correctly

Trying to add pagination to a custom post type query. I’ve used this same code before, but it keeps breaking on me – sending to 404 page. Not sure what’s going on here but would love some help if anyone can see my error(s). One note: In my Settings -> Permalinks admin area, I have

Read More
PHP

How to use the serializer for saving snapshot of complex entities

I’m working on a Symfony project where I have an entity called Richiesta that contains many nested relationships, some of which are OneToMany, ManyToOne, and ManyToMany associations. At a certain point in the process, I need to serialize all the data from the Richiesta entity (including its related entities) and save it as JSON in

Read More
PHP

php script getting error, this should download links of a webpage

fellow developers! I’m currently working on a PHP project where I need to: Extract all the URLs (especially links to downloadable files) from a webpage. ex: https://samplefile.download/sample-mp3-files/ Display these URLs so that I can choose which files to download. Finally, programmatically download only the selected files. <?php function get_webpage_content($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,

Read More
PHP

Which is better conditional rendering or separation of files in PHP?

i have a website where there are users with multiple privileges with difference in UIs and actions that are allowed/not allowed in the page , i have been overthinking about an approach that will make our lives more easier and we mainly have 3 privileges for now , i started already with conditional rendering however

Read More
PHP

Can I carry the key of an array element when passing it as argument to a function?

Given this array: $food = [ 'meat' => ['beef','chicken'], 'veg' => ['salad','onions'], ] and this function function foo($a) { print key($a); } invoking foo($food['meat']) returns 0 instead meat Since I need to know which element I’m working on I can add another argument to the function, but I wonder if there’s is a way to

Read More
PHP

Shared preferences not working in flutter

When installing shared_preferences, a problem occurs, and I have not used it yet. The problem also occurs when installing package: flutter_secure_storage platform_device_id dependencies: flutter: sdk: flutter shared_preferences: ^2.3.2 You need to sign in to view this answers

Read More
PHP

Analyzing the complete transaction information of Network bep 20 with API in PHP

Hello friends and teachers I want to get the information related to BEP20 network transaction in PHP through API or any other possible way. Information such as: Sender’s wallet address Receiver voltage address Transaction time and transaction amount Unfortunately, BCSscan.com’s API itself did not do this for me. Do you know a solution? You need

Read More