Skip to main content

Questions tagged [php]

PHP is a widely-used, general-purpose scripting language that is especially suited for web development.

4 votes
3 answers
121 views

CSV handling class

I'm a hobby coder at best. I know enough to make helpful programs to assist me with day to day life and work (mostly with PHP/JS, some C#). I'm wanting to learn more about good coding practices. I ...
Aethar's user avatar
  • 41
3 votes
2 answers
150 views

Laravel Wallet Service Backend

I’ve built a backend-only wallet service using Laravel 8, and it’s fully containerized with Docker. The project handles two user roles (Players and Backoffice Agents) and provides JWT-based ...
Şirin Berhuş's user avatar
2 votes
1 answer
89 views

Return breakdown of component from database into its constituent materials; correctly handle recursive scenarios

I’m working with a MySQL database that models product compositions and raw materials. There are two relevant tables with columns as shown: product_recipes: ...
Boom's user avatar
  • 121
5 votes
2 answers
235 views

Laravel as client for Strava 3rd party API

I’m developing a Laravel app which acts as a client to consume a 3rd party Strava API. My app also functions as an API for a frontend SPA. The user (which is just me for the time being) will already ...
ah5's user avatar
  • 51
3 votes
1 answer
185 views

Rendering data from mutiple models using controller and send to a single view

I have a master page, where I need to render data from multiple models. I have made a prototype of that page to show only the required conditions. What is the best approach for controller to retrieve ...
nischalinn's user avatar
6 votes
3 answers
537 views

PHP PDO wrapper class with security

I have created following php PDO wrapper class with the help of google and other some websites and my little knowledge. I will use this for less coding work without change whole previous coded ...
Sing O Song's user avatar
3 votes
1 answer
233 views

Image preview and delete for Laravel blog application

I am working on a blogging application in Laravel 8. I have put together a way to preview and remove the main article image. In the ArticleController.php controller,...
Razvan Zamfir's user avatar
3 votes
1 answer
95 views

A function that returns correct number of inserted, updated and skipped rows for INSERT or UPDATE query

When MySQL executes a Data Modification Query, it provides some additional info on the outcome, which is usually displayed in the console. This info is also being exposed through MySQL C API and this ...
Your Common Sense's user avatar
2 votes
2 answers
176 views

Convert binary string to text base64 [closed]

I have a dictionary with a lot of symbols, each of which is encoded in a huffman binary string. Example: Symbol Huffman Code you 010 shall 0111 not 00111 pass 00001 ... ... Therefore I encode the ...
Benzio's user avatar
  • 131
3 votes
1 answer
70 views

PHP script to generate named CSS grid areas

I wrote this PHP script to dynamically generate a topic header layout using CSS grid. The $columns array defines each column’s properties—like its CSS class, size, ...
live627's user avatar
  • 131
4 votes
2 answers
498 views

Improving upon the Security of my Export Remote Database to Local PHP API

I am working on an in-house application, and I am working on how our application communicates with our remote server. I have a PHP script that acts as an API to call to our MySQL DB and dump its ...
Cory Green's user avatar
3 votes
1 answer
67 views

Wordpress custom registration form with additional fields

I work on plugin for custom auth pages for WordPress and I try to create a custom registration form with additional fields. it has a shortcode in Beaver Builder. Is this the correct approach, and ...
Pavel Drow's user avatar
4 votes
1 answer
174 views

Replace node type in Drupal

In Drupal 11 or greater, this code is used to change the node type of a node. How would you improve the code if at all? ...
the_humble_asker's user avatar
5 votes
1 answer
554 views

User Management API

I got as task to build a simple Laravel API that should: 1 - Create User API 2 - Get Users API So I run the artisan command to ...
oderfla's user avatar
  • 235
2 votes
0 answers
56 views

SPA in Symfony UX Turbo

I am currently learning Symfony UX. My focus today was on UX Turbo. I basically wanted to create a very basic Single Page Application. User can 'login' using a form, submitting the form should render ...
O'Niel's user avatar
  • 341

15 30 50 per page
1
2 3 4 5
285