Version: Laravel 5.5 Model: Post, Comment Post’s columns: id, title, content, created_at, updated_at Comment’s columns: id, post_id, content, c_date, c_time, u_date, u_time Relation: A post has many comments and a comment belongs to a post. The following shows how to get posts, which had been comments in recent 24 hours. use CarbonCarbon; // use package Post::whereHas('comments', function ($query) { $query->whereRaw('(u_date = ? AND u_time >= ?) OR (u_date =? AND
read more看過長榮航空 2016 和 2017 年財務年報 看過 udemy android app 開發課 https://www.udemy.com/master-android-7-nougat-java-app-development-step-by-step/ database 資料庫相關章節的第 166~248 節 . 20180630 補充:已經看完第 249-263 節. 基礎課程的 introduction , downloading and setup, helloworld app, button-counter app. 看完 Youtuber hvass 機器學習
read morePostgreSQL version 10 WAL 設定概述 參數: checkpoint_timeout default is 5 minute max_wal_size default is 1GB archive_timeout full_page_writes checkpoint_warning checkpoint_completion_target default is 0.5 and only be fraction of checkpoint_timeout pg_test_fsync can measure average speed in microsecond of single WAL flush operation. Half of its value is effective for reporting average time setting that it flush single 8KB write operation to commit_delay. pg_test_fsync doesn’t care whether fsync
read moreCapistrano 部署 production 環境 從 Rails 4.2.5.1 升級到 Rails 5.2.0 的環境時遭遇了兩個問題 Cannot find gem bundler >= 0.a Solution for your production environment: reinstall rvm and bundler gem rvm implode rvm get head rvm reload rvm reset rvm use 2.4.1 rvm gemset create rails5.2.0 rvm use [email protected] --default gem install bundler which bundle modify config/deploy.rb content and
read more