I was working with one of my projects when I came across with an interesting question.
As we know, by default input
type="date" shows date as
Is it possible to change its format to something like:
DD-MM-YYYY? Continue reading Is there any way to change input type=“date” format?
Let’s say, your username is:
user1. And we want to change password (only!).
User model if we have rule like below:
[['username', 'email'], 'unique'],
then we have a big problem.
In case you want to change your password and leave all other form fields as they are, this configuration configuration will give error like:
user1 is not unique which is pretty weird.
What I want to achieve is, to validate only if actual values are changed. And I need this only for my
Update action. Because,
[['username', 'email'], 'unique'] covers
Create action pretty well
Continue reading Saving and validating only changed (dirty) values on Yii2
Today I’m going to give away 20 Navicat Premium Essentials for Mac license. Conditions are super easy, Continue reading Giveaway day: Navicat Premium Essentials for Mac!
Today, I’m going to share with you one priceless asset from my past projects. Below you’ll find download link to database table’s SQL file and logos zipped into one archive. Continue reading SQL list of all football clubs + logos in PNG
Thumbnail generation is very important for image-heavy projects. They help to reduce website’s outgoing traffic and they’re one of key factors for website’s load time optimisation.
Today, I want to share with you very simple way to achieve thumbnail generation right after image upload.
Continue reading Resizing and making thumbnails of images: The best practices
Nowadays, css breakpoints (media queries) in CSS as part of responsive design are very common to todays front-end developer. In this blogpost I’ll explain how, with a few CSS breakpoints, you can create a mobile version of your site. Continue reading CSS Breakpoints: Mobile first versus Non-Mobile First Method
I’m always deploying my projects using GIT. One of the key points in project’s security is backing it up in daily basis. So I came up with GIT based daily backup solution which cover’s SQL backup also. Continue reading Project’s daily backup using GIT
During development process one of my projects, I noticed that something going wrong with SluggableBehavior on non-english text (text was in russian): It can’t generate slugs from non-latin characters
So I came up with transliteration solution for SluggableBehavior.
Continue reading Supercharging Yii2 SluggableBehavior with transliteration feature
Recently, during development of a project I came across with following problem:
I wanted to create cronjob to execute some command in specific time, everyday. By the way, server os was Ubuntu 14.04.2 LTS. Continue reading Setting timezone for cronjobs
I wanted to redirect all http requests to https requests on one of my last projects. Continue reading How to rewrite all HTTP requests into HTTPS in NGINX