Skip to content

Instantly share code, notes, and snippets.

View anhtuank7c's full-sized avatar

Tuan Nguyen anhtuank7c

View GitHub Profile
composer require crabstudio/recaptcha
namespace App\Controller;
use App\Event\CheckProfileListener;
use Cake\Event\Event;
* CheckProfile trait
trait CheckProfile {
namespace App\Event;
use Cake\Event\Event;
use Cake\Event\EventListenerInterface;
class PostActiveListener implements EventListenerInterface
namespace App\Controller\Admin;
use App\Controller\AppController;
use App\Controller\CheckProfile;
* Dashboard Controller
namespace App\Shell\Task;
use Cake\Console\Shell;
use Cake\Core\Configure;
use Cake\ORM\TableRegistry;
* DeleteExpiredInactiveAccountTask
//Lưu ý: Việc cái nào nhúng vào cái nào chỉ là cách mình nói về 2 kiểu viết này
//1. nhúng php vào html
<?php foreach($products as $product):?>
<div class="product">
<h3 class="title"><?= $product->title?></h3>
<div class="content">
<p><?= $product->content?></p>
anhtuank7c / index.html
Created February 12, 2016 01:09
Demo jquery support Izwebz group facebook
<!DOCTYPE html>
<script src=""></script>
<script src=""></script>
anhtuank7c / app.php
Last active November 19, 2019 17:33
CakePHP RedisEngine configure
return [
* Debug Level:
* Production Mode:
* false: No error messages, errors, or warnings shown.
* Development Mode:
* true: Errors and warnings shown.
forced_root_block: false,
relative_urls: false,
mode: "exact",
elements: "content",
theme: "modern",
height: 300,
plugins: ["advlist autolink link image lists charmap preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking", "table contextmenu directionality emoticons paste textcolor responsivefilemanager fullscreen"],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | fullscreen preview code ",
namespace App\View\Widget;
use Cake\Core\Configure;
use Cake\I18n\I18n;
use Cake\View\Form\ContextInterface;
use Cake\View\Widget\BasicWidget;
* Input widget class for generating a textarea control.