azazqadir
azazqadir
Reputation Top 5%
Muhammad Azaz Qadir
8 Snippets  (140th place)
Published
1 Channel
Created
5 Channels
Following
yesterday at 2:04:00 PM
Last Visit
Nov 21, 2017
Registered
188 points  (166th place)
Reputation
Junior Code Generator
Serious Code Generator
Serious Publisher
Junior Popular Coder
Junior Autobiographer
Senior Autobiographer

Recent Snippets See all snippets by azazqadir

public by azazqadir created yesterday at 2:10:10 PM  11  0  3  0

Installing PHP Website on Linode Server

Here is how you can easily host a PHP based website easily and quickly on Linode using Cloudways PaaS: https://www.cloudways.com/blog/host-php-on-linode/
<?php
echo rand() . "\n";
echo rand() . "\n";

echo rand(5, 15);
?>
;

public by azazqadir created Nov 21, 2017  152  0  4  1

CDN integration in Yii2 App

How to integrate CloudwaysCDN with Yii2 applications: https://www.cloudways.com/blog/cdn-in-yii2/
// ...

'components' => [

   // ...

'cdn' => [
            'class' => '\yii2cdn\Cdn',
            'baseUrl' => defined ('YII2CDN_OFFLINE')
                ? 'http://localhost/yii2/cdn'
                : '//71265-358070-raikfcquaxqncofqfm.stackpathdns.com/cdn',
            'basePath' => dirname(__DIR__, 2) . '/cdn',
            'components' => [
                'font-awesome' => [
                    'css' => [
                        [
                            // local version
                            'font-awesome.min.css',
                            // cdn version
                            '@cdn' => '//71265-358070-raikfcquaxqncofqfm.stackpathdns.com/cdn/font-awesome/css/font-awesome.min.css',
                        ]
                    ]
                ]
            ],
        ],
 // ...

],

// ...
;

public by azazqadir created Nov 15, 2017  14  0  1  0

Using Eloquent Outside of Laravel for Other PHP Apps. Source: https://www.cloudways.com/blog/eloquent-illuminate-in-php-without-laravel/

Using Eloquent Outside of Laravel for Other PHP Apps. Source: https://www.cloudways.com/blog/eloquent-illuminate-in-php-without-laravel/: bootstrap.php
<?php



require "vendor/autoload.php";

use Illuminate\Database\Capsule\Manager as Capsule;



$capsule = new Capsule;



$capsule->addConnection([

   "driver" => "mysql",

   "host" =>"127.0.0.1",

   "database" => "acl",

   "username" => "root",

   "password" => ""

]);

$capsule->setAsGlobal();

$capsule->bootEloquent();

;

public by azazqadir created Oct 16, 2017  17  0  1  0

Laravel Blade Layout. Learn how you can quickly create a layout in Laravel using the Blade: https://www.cloudways.com/blog/create-laravel-blade-layout/

Laravel Blade Layout. Learn how you can quickly create a layout in Laravel using the Blade: https://www.cloudways.com/blog/create-laravel-blade-layout/: head.blade.php
<meta charset="utf-8">

<meta name="description" content="">

<meta name="Saquib" content="Blade">

<title>Checkout our layout</title>

<!-- load bootstrap from a cdn -->

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/3.0.3/css/bootstrap-combined.min.css">

;

public by azazqadir created Oct 9, 2017  14  0  1  0

Laravel REST API Authentication with Passport: https://www.cloudways.com/blog/rest-api-laravel-passport-authentication/

Laravel REST API Authentication with Passport: https://www.cloudways.com/blog/rest-api-laravel-passport-authentication/: auth.php
'guards' => [

   'web' => [

       'driver' => 'session',

       'provider' => 'users',

   ],



   'api' => [

       'driver' => 'passport',

       'provider' => 'users',

   ],

],

;