Skip to main content

PHP Collective

A collective where developers working with PHP can learn and connect about the open source scripting language.
1.5m Questions
+82
14.5k Members
+63
Contact

Pinned content

View all 3 collections

PHP admins have deemed these posts noteworthy.

Pinned
33 votes
8k views
Collection

Common Mistakes to Avoid in PHP

A list of real issues most beginners encounter when using PHP.
Sasha's user avatar
  • 101
Pinned
59 votes
5k views
2 minute read
How-to guide

Start learning PHP — Useful resources for beginners and advanced

Start learning PHP — Useful resources for beginners and advanced! If you're wondering where to start from learning the PHP language or needing some more knowledge to deep dive into the language, you ...
RB Projects's user avatar

Can you answer these questions?

View all unanswered questions

These questions still don't have an answer

0 votes
0 answers
11 views

Downloading wordpress core using wp-cli command

I have tried to install WordPress using the CLI command wp core download but I got: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) Can any one help me ...
0 votes
0 answers
15 views

Gedmo/Doctrine Tree Extension Cannot use object as array

I've created an entity with a closure table and a repository alongside. I'm trying a basic example of building a tree but am seeing the error Cannot use object of type App\Entity\Discussion\Comment as ...
0 votes
0 answers
24 views

How to integrate a custom search option with dynamic filelds using CodeIgniter 4 master data listing UI?

Can anyone suggest a best way for integrating search/filter options for master data UI ? I have around 20 fields/columns to search. I do not want to show 20 separate fields for this. Instead I want to ...
1 vote
0 answers
41 views

Instant response of the Like/Dislike buttons using Alpine.js in Livewire 3

I have logic for like/dislike button in two separate livewire components (LikeButton.php/DislikeButton.php) The problem is I want like/dislike buttons react immediately after clicking Currently, ...
0 votes
0 answers
40 views

How to handle authentication and authorization for multiple models (customer & staff) in Laravel with Inertia.js and Vue.js?

I'm building a Laravel application using Inertia.js and Vue and I want to support two different models with separate interfaces: Customer frontend: Customers can create groups, tasks, and requests and ...

Learn something new
These are the most recent articles in PHP Collective
0 votes
84 views
9 minute read
How-to guide

Quick guide to Laravel package development

Contents Introduction Types of packages Characteristics of a package The Laravel package! Components of a Laravel package Example of a Laravel package Creating your Laravel package 1- Package ...
Yousha Aleayoub's user avatar
2 votes
603 views
2 minute read
How-to guide

Properly removing API from Laravel project

Sometimes a development team may decide to remove all API functionality from a Laravel project for various reasons, such as: No longer needing any API, and shifting focus to web application with ...
Yousha Aleayoub's user avatar
9 votes
2k views
1 minute read
How-to guide

How to trim   (or non-breaking space) in PHP?

The main problem is the way trim() function works. One cannot reliably trim a substring using this function, because it takes its second argument as a collection of characters, each of which would be ...
Your Common Sense's user avatar
25 votes
57k views
3 minute read
Knowledge article

Evolution of Type Declarations in PHP

Introduction: PHP, being a dynamically typed language, traditionally allowed flexibility in variable types, providing both advantages and challenges in code maintenance and robustness. However, with ...
alkhatibdev's user avatar
59 votes
5k views
2 minute read
How-to guide

Start learning PHP — Useful resources for beginners and advanced

Start learning PHP — Useful resources for beginners and advanced! If you're wondering where to start from learning the PHP language or needing some more knowledge to deep dive into the language, you ...
RB Projects's user avatar