歡迎加入Laravel大本營,本文提供入門者快速有效(沒癈話)的環境設定。
已經會裝環境的人可以跳過本文。
再強調一下,如果可以 最完整的中文說明文件還是在官網 https://laravel.tw/docs/5.2
開發環境如下:
<?php | |
/** | |
* table info: | |
* CREATE TABLE examples | |
* ( | |
* `id` integer PRIMARY KEY, | |
* `enable` TINYINT(1) default 1, | |
* ); | |
* | |
*/ |
<script type="text/javascript"> | |
$(function () { | |
$("#user_success").on('submit', function(){ | |
var message = ""; | |
var emptyValue = false; | |
var name = $('[name="name"]', $(this)).val(); | |
var area = $('select[name="area"] option:selected', $(this)).val(); | |
var time = $('select[name="time"] option:selected', $(this)).val(); | |
var email = $('[name="email"]', $(this)).val(); | |
var phone = $('[name="phone"]', $(this)).val(); |
Fgplay::Application.configure do | |
# Settings specified here will take precedence over those in config/application.rb | |
# Code is not reloaded between requests | |
config.cache_classes = true | |
# Full error reports are disabled and caching is turned on | |
config.consider_all_requests_local = false | |
config.action_controller.perform_caching = true |
require 'uri' | |
url = 'http://link.photo.pchome.com.tw/s08/emily13isme/30/134072486922/' | |
file = nil | |
open(URI.escape(url)) do |f| | |
file = File.open("tmp.png", "wb") | |
file.write(f.read) if file | |
end |
# 記得先在 ec2 設定時間 | |
# ls -F /usr/share/zoneinfo/ | |
# ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime | |
# vi /etc/sysconfig/clock # 修改 clock 為台灣時間 | |
ZONE="Asia/Taipei" | |
# config/application.rb | |
config.time_zone = 'Taipei' | |
config.active_record.default_timezone = :local |
# See http://help.github.com/ignore-files/ for more about ignoring files. | |
# | |
# If you find yourself ignoring temporary files generated by your text editor | |
# or operating system, you probably want to add a global ignore instead: | |
# git config --global core.excludesfile ~/.gitignore_global | |
# Ignore bundler config | |
/.bundle | |
# Ignore the default SQLite database. |
// will be error. | |
$ sudo gem install rmagick -v '2.13.1' | |
// If you want to compile or install your own RMagick, you should install the following libraries in your system: | |
$ sudo apt-get install libbz2-dev libxt-dev libxext-dev | |
// Then remove the following file if exists: | |
$ sudo rm /opt/bitnami/common/lib/libbz2.a | |
// And finally you can install RMagick |
<?php | |
/** | |
* Alias 用戶關注的資料表 | |
*/ | |
class TargetUser extends User | |
{ | |
static $table_name = "users"; | |
} |
歡迎加入Laravel大本營,本文提供入門者快速有效(沒癈話)的環境設定。
已經會裝環境的人可以跳過本文。
再強調一下,如果可以 最完整的中文說明文件還是在官網 https://laravel.tw/docs/5.2
開發環境如下:
### 城市搜尋器 | |
link: https://github.com/rinvex/country | |
version: `5.1.*|5.2.*|5.3.*` |