Register a bot

Chat with Telegram BotFather on Telegram app

Type this in your chat

Then follow instruction from BotFather. When finished you will get bot_token which look like: [number]:[text]

Please keep it securely, if someone stole it, they can work like you.

Setup Mailhog service to receive emails

Install MailHog

with apt

If server cannot access github, we can download directly from Mailhog

then make the file executable

Add MailHog as system service

In default nginx config for Laravel, add more location for new application

The expectation is:

We have domain: which is running a Laravel application, we need other application like this

Add below config in nginx configuration of your domain

restart nginx and visit 2 sites for your apps

This will apply for both Eloquent and Query Builder - DB

To debug your sql in Laravel you can you

The result

To view full sql with parameter, use this piece of code

The result

Laravel provides many convenience ways to validate date

From document let’s take for example

> The field under validation must be a value after a given date. The dates will be passed into the PHP function in order to be converted to a valid instance:

Instead of passing a date string to be evaluated by , you may specify another field to compare against the date:

However, how to validate with a custom format?

Luckily, we have date_format validator

With this format, we can put anything we need there to validate

To import CSV file to mysql database, we have many ways

  1. DATA LOAD INFILE → this need to be logged in to mysql console, more info here
  2. use mysqlimport

in terminal run command


For example, you have 4 columns id,name,age,created_at in table, but you just need to import name and age — -> -c name,age

Remember that the data of name, age in csv file must be in order separately

Photo by Djim Loic on Unsplash

I would like to write a blog on life experience. But I cannot find out any suitable time to write. Just like reading as well.

Fortunately, I found that the break time for lunch is a good time to write. So this is the first article I first started.

Take a look back 4 years ago when I started my own business. It came from an idea and an ideal.

I found that Facebook is a trend for digital marketing, so I made some research on this industry and found that there was no perfect solution on reporting data…

Nguyễn Tuấn Phúc

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store