CodeIgniter Coding Standard v1.0.0 released! https://github.com/CodeIgniter/coding-standard/releases/tag/v1.0.0
Cara pakai:
- Daftarkan code ke Version Control biar bisa di-undo kalau ada false positive, contoh undo dari git:
git checkout .
{ | |
"require": { | |
"guzzlehttp/guzzle": "4.*" | |
} | |
} |
# Goes in your .git/config file | |
[alias] | |
# Temporarily stop tracking a file in git. | |
# usage: git unwatch path/to/file | |
unwatch = update-index --assume-unchanged | |
# Resume tracking a file in git. | |
# usage: git watch path/to/file | |
watch = update-index --no-assume-unchanged |
<?php | |
// ... | |
public function barcodeAction() | |
{ | |
$barcodeOptions = array('text' => 'ZEND-FRAMEWORK'); | |
$barcode = \Zend\Barcode\Barcode::factory('code39', 'Image', $barcodeOptions); | |
//temporary save file into data folder | |
imagegif($barcode->draw(), './data/barcode.gif'); | |
CodeIgniter Coding Standard v1.0.0 released! https://github.com/CodeIgniter/coding-standard/releases/tag/v1.0.0
git checkout .
symfony set dev to prod : http://symfony.com/doc/current/cookbook/deployment/tools.html#d-clear-your-symfony-cache symfony switch back to dev :
composer install --dev --optimize-autoloader
./app/console cache:clear
./app/console router:debug
<?php namespace App\Commands; | |
use CodeIgniter\CLI\BaseCommand; | |
use CodeIgniter\CLI\CLI; | |
class CreateDb extends BaseCommand | |
{ | |
protected $group = 'app'; | |
protected $name = 'app:createdb'; | |
protected $description = 'Create database'; |
$routes->group('user', [ | |
'filter' => 'permission:manage-user', | |
'namespace' => 'agungsugiarto\boilerplate\Controllers\Users', | |
], | |
function($routes) | |
{ | |
$routes->get('show', 'UserController::show', ['as' => 'user-show']); | |
}, | |
function ($routes) | |
{ |
use Zend\Mail\Message; | |
use Zend\Mail\Transport\Smtp as SmtpTransport; | |
use Zend\Mime\Message as MimeMessage; | |
use Zend\Mime\Part as MimePart; | |
use Zend\Mail\Transport\SmtpOptions; | |
////////// | |
$message = new Message(); |
<?php | |
class DsnReader | |
{ | |
private $dsn; | |
public function __construct($dsn) | |
{ | |
$this->dsn = $dsn; | |
} |
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC,OR] | |
RewriteCond %{REQUEST_URI} !yourapp/public | |
RewriteRule (.*) /yourapp/public/$1 [L] | |
place it at your public_html (shared hosting 'root' directory ). | |
if you call http://yourdomain.com so you will point out to public_html/yourapp/public/index.php |