Daily Archives: 11/22/2020

To Create a SFTP User in Ubuntu

Steps

To Edit SSH config

To Debug SSH

 

Reference:

  1. https://wisdmlabs.com/blog/create-an-sftp-user-with-limited-access-on-ubuntu/

Get last item of an array

Use array_key_last() to get last key. Do not use end(), if the item contain objects, end() will cause error.

Use Laravel Collection Object

 

Where with Subquery

Laravel Example

SQL

 

Reference:

  1. https://justcode.ikeepstudying.com/2016/08/mysql%E5%85%A5%E9%97%A8-%E4%B9%9D-%E5%AD%90%E6%9F%A5%E8%AF%A2-subquery/
  2. https://ithelp.ithome.com.tw/articles/10032121