Validation Laravel
By Phạm Đình Hậu | Laravel
Nếu không nhập liệu thì không vaild. Sử dụng nullable
Ví dụ:
‘mobile’ => [
‘max: 11’,
‘alpha_num’,
‘nullable’
],
By Phạm Đình Hậu | Laravel
Nếu không nhập liệu thì không vaild. Sử dụng nullable
Ví dụ:
‘mobile’ => [
‘max: 11’,
‘alpha_num’,
‘nullable’
],
By Phạm Đình Hậu | Laravel
\DB::table(‘table1 AS t1’)
->leftJoin(\DB::raw(‘(SELECT * FROM table2 A WHERE id = (SELECT MAX(id) FROM table2 B WHERE A.id=B.id)) AS t2’), function($join) {
$join->on(‘t1.id’, ‘=’, ‘t2.id’);
})->get();
===
\DB::table(‘table1 AS t1’)
->leftJoin(\DB::raw(‘(SELECT MAX(id), col1, col2 FROM table2 GROUP BY col1, col2) as t2’), function($join) {
$join->on(‘t1.id’, ‘=’, ‘t2.id’);
})->get();
By Phạm Đình Hậu | Khách hàng
Demo: http://greencom.vn/
By Phạm Đình Hậu | Khách hàng
Demo: http://tienphongcenter.com/
By Phạm Đình Hậu | Khách hàng
Demo: http://chukyso.ict-backan.gov.vn/
By Phạm Đình Hậu | Khách hàng
Demo: http://thaihunghotelhalong.com.vn/
By Phạm Đình Hậu | CentOS , Ubuntu
Open .htaccess
<IfModule LiteSpeed>
CacheDisable public /
CacheDisable private /
</IfModule>
By Phạm Đình Hậu | Lập trình
Set option to map:
map.setOptions({‘scrollwheel’: false});
By Phạm Đình Hậu | Wordpress
Chi tiết: https://wordpress.org/plugins/post-grid/changelog/
By Phạm Đình Hậu | CentOS
Trên centos 6:
Restart: service nginx restart
Stop : service nginx stop
Start: service nginx start
Trên centos 7:
Restart: systemctl restart nginx.service
Stop: systemctl stop nginx.service
Start: systemctl start nginx.service
Trên centos 6:
Restart: service php-fpm restart
Stop : service php-fpm stop
Start: service php-fpm start
Trên centos 7:
Restart: systemctl restart php-fpm.service
Stop: systemctl stop php-fpm.service
Start: systemctl start php-fpm.service
Trên centos 6:
Restart: service mysql restart
Stop : service mysql stop
Start: service mysql start
Trên centos 7:
Restart: systemctl restart mariadb.service
Stop: systemctl stop mariadb.service
Start: systemctl start mariadb.service
Nguồn: hostingaz.vn
By Phạm Đình Hậu | mySQL
Open file my.ini location xampp\mysql\bin\my.ini
Change value:
max_allowed_packet = 64M
innodb_lock_wait_timeout = 500
By Phạm Đình Hậu | Giải trí
– Tải thêm plugin cho CK: http://ckeditor.com/addon/print
– Sử dụng:
By Phạm Đình Hậu | jQuery
Từ bản jQuery 1.9 đã bỏ đi phần $.browser.msie. Qua tìm trên stackoverflow thấy có phần xử lí như sau:
You could consider including the relevant code from jQuery 1.8 https://github.com/jquery/jquery/blob/1.8.3/src/deprecated.js
File deprecated.js
By Phạm Đình Hậu | iOs
Download iOS 7.1.2 IPSW:
iPad Air
iPad 4
iPad Mini
iPad Mini 2 (iPad Mini Retina)
iPad 3
iPad 2
iPhone 5
iPhone 5c
iPhone 5s
Iphone 4s
iPhone 4
iPod Touch 5
By Phạm Đình Hậu | Nukeviet
Mở mainfile.php lên comment dòng:
$ErrorHandler = new Error( $global_config );
set_error_handler( array( &$ErrorHandler, ‘error_handler’ ) );
By Phạm Đình Hậu | Tản mạn
20.12.2013:
18.12.2013:
17.12.2013:
By Phạm Đình Hậu | CentOS
Find file php.ini:
/usr/local/lsws/lsphp5/lib
Add or Edit:
date.timezone = “Asia/Ho_Chi_Minh”
Restart httpd
OK
By Phạm Đình Hậu | CentOS
Vào console dùng lệnh sau:
#ln -sf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime
Kiểm tra xem đã ok:
#date
Done
By Phạm Đình Hậu | Ghi chú
Chủ tàu mời mãi mà nhiều người đi và nhiều người không. Nó nghĩ chắc là chủ kiểu gì chả lầm bầm: có 10k chứ mấy mà ki bo. Nhưng Nó thấy: Hơn 10 cái xe máy trên 1 cái tàu nhỏ và người nữa. Không biết có an toàn không. Nó tự nhủ: Chậm 1 lúc để không chậm cả cuộc đời. Nhiều khi không vội được đâu. Và Nó mỉm cười. Nhiều khi Nó hâm như thế đó!!!