Monday, March 4, 2024

Setup Laravel in Visual Studio Code - Getting started

Setup Laravel in Visual Studio Code

Laravel is a very popular PHP Framework for developing web applications. There are many ways to get started with Laravel development in different platforms. But, the most commonly used IDE by developers is visual studio code because it is open source and has support for multiple languages. It even has extensions enabling to integrate third-party tools and services, thus allows for faster development. Here, two approaches are used to download and install Laravel in vscode.

  1. Clone Git repository
  2. Composer (tool to get packages and dependencies)


After you download Laravel, first thing that you have to is create a .env file and copy the configurations from the .env.example to .env file. Then, Generate app key and assign to the setting variable.

Advertisement

Thursday, February 29, 2024

Install WordPress on IIS (Internet Information Services)

Install WordPress on IIS

WordPress is an open-source Content Management System (CMS) built using core PHP. It is a production ready web application package which can be setup in minutes to publish content for the end users. Administrators have complete control over the information being displayed on the site. Managing all aspects of the site is made possible through admin panel.


Deploying WordPress on IIS requires you to configure IIS Manager to handle PHP requests. In order to handle PHP requests enable CGI module from windows features. Install PHP package and register in IIS Manager using PHP Manager for IIS, which is a tool to manage different versions of PHP.

Wednesday, February 14, 2024

Configure Visual Studio Code for PHP development using IIS Express

Setup VS Code for PHP Development using IIS Express

Visual studio code has been the preferred IDE for software development among the developers and the most popular because of the support for building software in multiple languages and platforms, third-party extensions that boosts productivity. Developing PHP applications in visual studio code requires configuring it to handle PHP requests. 

First, you need to have PHP installed on your machine. In VS Code, open the settings and set the path to the PHP executable in the validation setting.

Next, to configure IIS Express settings download and install IIS Express which is a lightweight web server for development purposes. In the VS Code settings set the path to the executable for both iisexpress Appcmd and iisexpress.

Friday, August 20, 2021

Trigger function in DIV

 How to trigger function in DIV

The events in the object fires when the page loads, mouse events , keyboard events and other types of inputs. It is not possible to trigger an event in the DIV for example, onload event when the object is loaded. Some elements like body, script, link, image, style support firing up of events. However, it is required for the developer to trigger the event in object DIV. In order to do that we can use jquery trigger method to fire the event.

HTML

<div onload="$(this).text('I will display in Div using text()');"></div>
<div onload="welcome()"></div>

Javascript/Jquery

function welcome(){
alert('Hello world! in func welcome');
}

$(function(){
$('div[onload]').trigger('onload');
});

Friday, September 11, 2020

Move column data from one table to another

There may be situations when you want to move MYSQL column data from one table to another. 

MySQL Query: 

UPDATE accounts_users, accounts_membership  SET accounts_users.username=accounts_membership.username WHERE accounts_users.user_id=accounts_membership.user_id AND accounts_users.user_id >= 1;

Sending email from website using Microsoft Office 365 OAuth2

Step 1: Register an Application in Microsoft Entra ID Sign in to the Microsoft Azure portal: Microsoft Azure Portal Navigate to: Microsoft E...