How add our class to service container (Laravel)

In Laravel, the service container is a powerful tool for managing class dependencies and performing dependency injection. It is also known as the IoC (Inversion of Control) container. The service container is used to bind classes into the container, resolve dependencies, and manage the lifecycle of objects. Let’s create a simple example where we have… Continue reading How add our class to service container (Laravel)

Published
Categorized as Technology

Ajax Request Possible Ways

Ajax (Asynchronous JavaScript and XML) is a technique used in web development to create dynamic and interactive user interfaces. It allows you to make asynchronous HTTP requests to the server and update parts of a web page without requiring a full page refresh. Here are a few ways to implement Ajax using JavaScript: NOTE:- Modern… Continue reading Ajax Request Possible Ways

Published
Categorized as Technology

Install PHPUnit, WP-CLI phar, and Scaffold Unit Tests for WordPress Plugin

It looks like you have provided instructions for setting up PHPUnit and WP-CLI for WordPress plugin development, along with the steps to scaffold unit tests for your plugin. Additionally, you have included instructions for setting up the ‘wordpress_test’ database for the test suite. Let me break down the steps: Install PHPUnit: Install WP-CLI: Scaffold Unit… Continue reading Install PHPUnit, WP-CLI phar, and Scaffold Unit Tests for WordPress Plugin

Published
Categorized as Technology

Install wp-cli (command line) for WordPress

To install WP-CLI for WordPress, you can follow these steps. WP-CLI is a command-line interface for managing WordPress installations, and it can be very useful for various tasks. Prerequisites: Installation Steps: Alternatively, you can use wget: If you encounter permission issues, you may need to use sudo or adjust file permissions accordingly. This command should… Continue reading Install wp-cli (command line) for WordPress

Published
Categorized as Technology

Use of PHPCS and PHPCBF in WordPress

Once you have installed PHP_CodeSniffer (PHPCS) and PHP Code Beautifier and Fixer (PHPCBF), you can use them to check and fix coding standards for a specific file or directory. Here’s how you can use them: PHPCS (Checking Coding Standards): For a Single File: For a Directory: Example with WordPress Coding Standards: PHPCBF (Fixing Coding Standards):… Continue reading Use of PHPCS and PHPCBF in WordPress

Install WordPress Codding Standard PHPCS PHPCBF in UBUNTU

To install WordPress coding standards and PHP_CodeSniffer (PHPCS) along with PHP Code Beautifier and Fixer (PHPCBF) on Ubuntu, you can follow these steps: Ensure that Composer’s global bin directory is in your system’s PATH. You can add it to your ~/.bashrc or ~/.zshrc file: Then, refresh your shell: Or for zsh: After cloning, make sure… Continue reading Install WordPress Codding Standard PHPCS PHPCBF in UBUNTU

Laravel Install From Scratch

Working with Laravel from scratch involves several steps, including installation, setting up your development environment, creating a new project, and building features. Here’s a step-by-step guide to help you get started: 1. Install Prerequisites: Before you start with Laravel, make sure you have the following installed on your system: 2. Install Laravel: Open a terminal… Continue reading Laravel Install From Scratch

Laravel Artisan commands

Laravel’s command-line tool is called Artisan, and it provides a variety of commands for tasks such as database migrations, testing, and more. Here are some commonly used Artisan commands in Laravel: These are just a few examples, and Laravel’s Artisan provides many more commands for various tasks. You can explore the full list and details… Continue reading Laravel Artisan commands

Published
Categorized as Technology