This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//image slider of hasinhayder | |
https://github.com/hasinhayder/image-slide-with-single-img | |
//wordpress plugin | |
http://wpplugindirectory.org/ | |
// if need add timestamp or userinfo by default have to use cakephp behaviors | |
//for theme add a line in appController and theme name in bootstrap.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path = $_POST['image']['name']; | |
$ext = pathinfo($path, PATHINFO_EXTENSION); | |
list( $width, $height ) = getimagesize( $_POST['imageInfo']['tmp_name'] ); | |
$newwidth = 100; | |
$newheight = 100; | |
$thumb = imagecreatetruecolor( $newwidth, $newheight ); | |
if ( $ext == 'png' ) { | |
$source = imagecreatefrompng( $_POST['imageInfo']['tmp_name'] ); | |
imagecopyresized( $thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for normal validation which we will use before in laravel controller need to use 2 file in controller | |
use Illuminate\Support\Facades\Validator; | |
use Illuminate\Support\Facades\Input; | |
//for greater case return Redirect::back() need to use this file in controller | |
use Illuminate\Support\Facades\Redirect; | |
//how to use eloquent outside laravel | |
https://www.youtube.com/watch?v=L0g9ka5qaCc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "../bootstrap.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Paypal{ | |
public $apiContext; | |
public function __construct() { | |
$this->apiContext = new \PayPal\Rest\ApiContext( | |
new \PayPal\Auth\OAuthTokenCredential( | |
'AfdxlpJ5HaMVw3h1vxzA5Y3dgg3fcCQW_zj7ngtXOl2YSFvY1hX8fbBraNt-CimMrr7VNMG8w2FsOw8Q', // ClientID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="https://sandbox.paypal.com/uk/cgi-bin/webscr" method="post" name="paypal" id="paypal"> | |
<input type="hidden" name="cmd" value="_xclick"> | |
<input type="hidden" name="business" value="test@yahoo.com"> | |
<input type="hidden" name="item_name" value="Test Item"> | |
<input type="hidden" name="item_number" value="5"> | |
<input type="hidden" name="amount" value="5"> | |
<input type="hidden" name="no_shipping" value="0"> | |
<input type="hidden" name="no_note" value="1"> | |
<input type="hidden" name="currency_code" value="USD"> | |
<input type="hidden" name="lc" value="AU"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://gist.github.com/kingpabel/21c8c634cbe60ebfbfe1.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for clear composer cache | |
composer clearcache | |
composer clear-cache | |
rm -rf ~/.composer/cache* | |
//increase composer timeout | |
export COMPOSER_PROCESS_TIMEOUT=600 | |
COMPOSER_PROCESS_TIMEOUT=2000 composer install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
//app defined | |
var myApp = angular.module("myApp", []); | |
//multiple controller in a single app | |
myApp.controller("studentController", function($scope){ | |
$scope.student = { | |
firstName: "Mahesh", | |
lastName: "Parashar", | |
fullName: function() { | |
return $scope.student.firstName + " " + $scope.student.lastName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"require":{ | |
"mpdf/mpdf": "dev-master" | |
} |
OlderNewer