Skip to content

Instantly share code, notes, and snippets.

View AbiruzzamanMolla's full-sized avatar
🏠
Working from home

Abiruzzaman Molla AbiruzzamanMolla

🏠
Working from home
View GitHub Profile
@AbiruzzamanMolla
AbiruzzamanMolla / docker-compose.yml
Created December 23, 2024 07:38 — forked from hasinhayder/docker-compose.yml
Quickly deploy mysql and phpMyAdmin with this docker compose file
services:
mysql:
image: mysql:8.4.3
restart: always
ports:
- 3306:3306
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
@AbiruzzamanMolla
AbiruzzamanMolla / chatGpt4-resolve-issue.md
Created November 21, 2024 12:11
Resolver way the get extended class valuels

I see, your scenario involves multiple layers of extensions to the PaymentMethodService class (e.g., first by PaymentGatewayService, then by BkashGatewayService), and you want to call PaymentMethodService but ensure that all of its extensions (including those applied by various service providers) are taken into account.

In Laravel, when you bind a class to the service container, it will always resolve the last binding unless you explicitly manage the resolution. This can cause issues when you have multiple extensions happening in different service providers, as each extension might overwrite the previous one in terms of the container's resolution behavior.

Solution: Dynamic Class Resolution Using Multiple Extensions

To handle multiple extensions without facing issues where a facade or the service container always resolves the final binding, here's a more dynamic approach:

  1. Use Multiple Bindings: You can make the service container aware of all the extended classes (lik
@AbiruzzamanMolla
AbiruzzamanMolla / view-inject-ai-response.md
Last active November 19, 2024 06:44
View Injecting for plugin

ChatGPT-4 Response

To inject new code into your existing views when you install a new plugin in your Laravel application using Laravel Modules, you can follow these steps:

1. Create a Plugin Module

  • First, create a new module for your plugin using the Laravel Modules package. You can do this by running:
    php artisan module:make MyPlugin
  • This will create a new module named MyPlugin in the Modules directory.
## For DDev Setup
To configure Visual Studio Code to use the PHP binary from your Docker DDEV setup, you need to point VS Code to the PHP binary inside your Docker container. Follow these steps:
---
### 1. **Determine the PHP Path in DDEV**
- Start your DDEV project:
```bash
ddev start
@AbiruzzamanMolla
AbiruzzamanMolla / laravel-plugin-research.md
Last active October 16, 2024 04:15
Laravel Plugin System

6am Tech

  • They are using Laraval modules package as plugin
  • using a custom configuration file
  • probably all there projects have same structure otherwise they won't be able to implement on plugin for many projects.

Active Ecom

  • they are using a custom configure file
  • using direct file update system (same as our version updating system)
  • probably there codes also have same structure for all other projects.
@AbiruzzamanMolla
AbiruzzamanMolla / bash.bashrc
Created August 25, 2024 13:26
my gitbash alias
# Define the gitupdate function
gitupdate() {
local commitMessage="$1"
local branch="$2"
if [ -z "$commitMessage" ]; then
echo "Error: Commit message is required."
return 1
fi
@AbiruzzamanMolla
AbiruzzamanMolla / bash.rc
Created August 25, 2024 13:11
gitbash alies
# Define the gitupdate function
gitupdate() {
local commitMessage="$1"
local branch="$2"
if [ -z "$commitMessage" ]; then
echo "Error: Commit message is required."
return 1
fi
@AbiruzzamanMolla
AbiruzzamanMolla / README.md
Created June 12, 2024 12:25 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="#333844">
<!-- Windows Phone -->
@AbiruzzamanMolla
AbiruzzamanMolla / php.json
Created February 27, 2024 09:50 — forked from thecodeholic/php.json
PHP/Laravel Live snippets for VSCode
{
"Create public function": {
"prefix": "pubf",
"body": [
"public function $1()",
"{",
"\t$2",
"}",
],
"description": "Create public function"