Skip to content

Instantly share code, notes, and snippets.

Muhammad Azaz Qadir azazqadir

  • Karachi, Pakistan
Block or report user

Report or block azazqadir

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View laravel.php
Route::group(['prefix' => 'api/v1'], function () {
Route::get('/getTasks', function () {
return Task::all();
Route::post('/addTask', function (Request $request) {
azazqadir /
Created Sep 22, 2018
Step by Step Guide to Deploy Symfony Web to Server Using Envoyer

Step 1: Create an Envoyer Account and Add a Project Step 2: Connect Your GitHub Repository With Envoyer Account Step 3: Integrate Your Server With Envoyer Step 4: Click the Deploy button for actual project deployment.

Source: Deploy Symfony using Envoyer

View ssl
namespace MyApp\Http\Middleware;
use Closure;
class HttpsProtocol {
public function handle($request, Closure $next)
if (!$request->secure() && env('APP_ENV') === 'prod') {
return redirect()->secure($request->getRequestUri());
View search.blade.php
<!DOCTYPE html>
<meta name="_token" content="{{ csrf_token() }}">
azazqadir /
Created Aug 23, 2018
Integration of React in Symfony

Here is a detailed step by step guide on integrating react in Symfony using pure javascript library by the framework, Webpack Encore. Webpack Encore is a simpler way to integrate Webpack into your application. It wraps Webpack, giving you a clean & powerful API for bundling JavaScript modules, pre-processing CSS & JS and compiling and minifying assets. Encore gives you professional asset system that's a delight to use.

azazqadir /
Created Aug 6, 2018
Symfony 4 Installation Command

Use the following composer command to install Symfony 4

composer create-project symfony/skeleton symfony4

Flex is now included as a dependency in the new version. You can easily create a new Symfony 4 skeleton projects with Flex enabled.

azazqadir /
Created Jun 26, 2018
PHP 5.6 Performance Benchmarks Compared with PHP 7 on Laravel 5.4

When tested Laravel 5.4 on PHP 5 vs 7 for performance benchmark, the latter was 50% faster than the previous version. With PHP 5.4, the response time was 553ms, whereas with PHP 7 it was 274ms. This is enough to prove that it is time to start upgrading to PHP 7 and make websites load faster.

azazqadir /
Created May 17, 2018
Enable SSL Certificate on Custom PHP website

To enable SSL on PHP, you need to install the SSL certificate. If you are doing it using Cloudways, then you can either enable Free SSL by Let's Encrypt on one click from the settings or install custom SSL.

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
azazqadir /
Created May 14, 2018
Creating a Connection Between MySQL and PHP

This tutorial guides you how to connect MySQL database with PHP. To establish the connection, you can simply do it with MySQL or you can use MySQLi or PDO (PHP Data Objects).

For MySQL, simply add followin code in db_connection.php file in your root.


function OpenCon()
 $dbhost = "localhost";
azazqadir /
Created Apr 9, 2018
Using Envoyer for PHP App Deployment

Envoyer is a great tool for deploying PHP Applications with zero downtime on your server.

Step 1: Create Envoyer Account and Add a Project

Step 2: Connect to a Repository on Github, Bitbucket or any other self-hosted repository

Step 3: Head to the server tab and click the add server button.

Step 4: Deploy your application

You can’t perform that action at this time.