Month: November 2024

Add Plugin in Bedrock

User add new plugin in bedrock composer Assistant To add a new plugin to your Bedrock-based WordPress project using Composer, follow these steps: 1. **Navigate to your Bedrock project directory**: Open your terminal and change to your Bedrock project directory. cd path/to/your/bedrock 2. **Require the plugin via Composer**: Use the `composer require` command to add […]

Essential WordPress Plugins

User wordpress required plugins Assistant The required plugins for a WordPress site can vary based on its purpose, but here are some essential plugins that most WordPress installations can benefit from: 1. **Yoast SEO** or **All in One SEO Pack**: Helps optimize your site for search engines with features like meta tags, sitemaps, and content […]

Bud Not Found Error

User yarn run build yarn run v1.22.22 $ bud build /bin/sh: bud: not found error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. in php container docker Assistant The error message indicates that the command `bud` is not found in your PHP Docker container. This usually means that Bud […]

Nginx WordPress Redirection Fix

User version: '3.8' networks: wpbedrock: driver: bridge services: # Nginx Service nginx: image: nginx:stable-alpine container_name: ${APP_NAME}_nginx ports: – "2500:80" links: – php volumes: – ./bedrock:/var/www/html – ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf:rw – ./docker/logs/nginx:/var/logs/nginx:rw depends_on: – php – mysql networks: – wpbedrock # PHP Service php: build: context: . dockerfile: Dockerfile container_name: ${APP_NAME}_php volumes: – ./bedrock:/var/www/html # Fixed typo in […]

jQuery Click Event Handling

User jQuery(".sorticon").on('click', function(e) { alert("adsfd"); var sortcol = jQuery(this).data('col'); var sortorder = jQuery(this).data('sort'); $("#sortcol").val(sortcol); $("#sortorder").val(sortorder); search(); }) make above body with on Assistant You can use the `.on()` method in jQuery to handle events for multiple elements, and you can simplify the code using an arrow function for better readability. Here’s how you can rewrite […]

Query Search Issue

User $qrySearch = Project::query(); if ($search) { $qrySearch->where(function ($query) use ($search) { $query->whereHas('client', function($q) use ($search) { $q->where('client_name', 'like', '%' . $search . '%'); }) ->orWhere('projects.project_name', 'like', '%' . $search . '%'); }); } not working Assistant The query might not be working due to a possible issue with table naming or relationships. Here’s a […]

Query Condition Error Fix

User $search = (isset($request->search)) ? $request->search : ''; $client = (isset($request->client)) ? $request->client : ''; $project = (isset($request->project)) ? $request->project : ''; $qrySearch = Project::query(); if ($search) { $qrySearch->whereHas('client', function($query) use ($search) { $query->where('client_name', 'like', '%' . $search . '%'); }) ->orWhere('projects.project_name', 'like', '%' . $search . '%'); // $qrySearch->where(function ($query) use ($request) { // […]

Project Search and Filter

User projects belong to client set search by client name and also if client filter selected Assistant To set up a search functionality for projects based on the client name and apply a client filter in a Laravel application, you can follow these steps. I'll walk you through setting up the search and filter functionalities […]

Website URL for WordPress

User version: '3.8' networks: wpbedrock: driver: bridge services: # Nginx Service nginx: image: nginx:stable-alpine container_name: ${APP_NAME}_nginx ports: – "2500:80" links: – php volumes: – ./bedrock:/var/www/html – ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf:rw – ./docker/logs/nginx:/var/logs/nginx:rw depends_on: – php – mysql networks: – wpbedrock # PHP Service php: build: context: . dockerfile: Dockerfile container_name: ${APP_NAME}_php volumes: – ./bedrock:/var/www/html # Fixed typo in […]

Docker Compose Setup

User docker yml for , ngnix, mysql,adminer, php 8.3 with env Assistant Here's a Docker Compose setup for a Laravel application with **Nginx**, **MySQL**, **Adminer**, and **PHP 8.3**. This configuration includes environment variables for flexibility, and it also mounts the necessary files for Laravel development. Save this as `docker-compose.yml` in your project root. version: '3.8' […]