2013年7月20日 星期六
為理想而活
如果為了錢而去工作 相信我"自己"應該會有一份不錯的收入
然後每天活在自我感覺良好的世界
每天過著吃好、住好、車好的日子
彷彿外面世界的紛擾與自己無關一樣
然後虛度一生,吃的、住的、開的,死後什麼也帶不走
沒留給這個世界一點什麼、也沒人記得你做了什麼
彷彿不曾活在這個世界
所以我寧願選擇為世界做點什麼
為世界帶來一些些的小改變也好
努力的"活"在這個世界
吃可以不用吃太好,餓不死就好
住可以不用住太好,有個窩就好
車可以不用開太好,可以動就好
但是我每天一定要"活"得很好
2013年7月4日 星期四
Laravel 4 Migrate介紹
php artisan migrate指令
在命令列輸入php artisan後,可以看到migrate指令$ php artisan
migrate
migrate:install Create the migration repository
migrate:make Create a new migration file
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate指令用途
| 指令 | 說明 |
|---|---|
| migration | 執行尚未執行的migration |
| migrate:install | 在資料庫建立migration管理資料表 |
| migrate:make | 建立新的migration檔案 |
| migrate:refresh | 重設資料庫所有的migration,並重新執行所有的migration |
| migrate:reset | 重設資料庫所有的migration |
| migrate:rollback | 復原最後一筆migration紀錄 |
在Laravel 4使用artisan建立app key
清除檔案中的key
在app/config/app.php檔案中你會找到一組key的位置,這個key是一組32個字元的key,我們可以自己輸入想要的key,或者使用Laravel 4提供的Artisan命令列去自動亂數產生一組key使用artisan指令產生key
在命令列輸入php artisan可以看到所有artisan支援的指令,你可以找到key:generate可以產生一組亂數的key。$ php artisan
Laravel Framework version 4.0.0
Usage:
[options] command [arguments]
Options:
--help -h Display this help message.
--quiet -q Do not output any message.
--verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version -V Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
--no-interaction -n Do not ask any interactive question.
--env The environment the command should run under.
Available commands:
clear-compiled Remove the compiled class file
down Put the application into maintenance mode
dump-autoload Regenerate framework autoload files
help Displays help for a command
list Lists commands
migrate Run the database migrations
optimize Optimize the framework for better performance
routes List all registered routes
serve Serve the application on the PHP development server
tinker Interact with your application
up Bring the application out of maintenance mode
workbench Create a new package workbench
asset
asset:publish Publish a package's assets to the public directory
auth
auth:reminders Create a migration for the password reminders table
cache
cache:clear Flush the application cache
command
command:make Create a new Artisan command
config
config:publish Publish a package's configuration to the application
controller
controller:make Create a new resourceful controller
db
db:seed Seed the database with records
key
key:generate Set the application key
migrate
migrate:install Create the migration repository
migrate:make Create a new migration file
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
queue
queue:listen Listen to a given queue
queue:subscribe Subscribe a URL to an Iron.io push queue
queue:work Process the next job on a queue
session
session:table Create a migration for the session database table
所以我們輸入php artisan key:generate即可產生我們需要的key了
php artisan key:generate
Application key [2wgjsIpDDIJvc4AgMV6VV1QybWznB6nY] set successfully.
檢查key產生狀況
接下來回到
app/config/app.php檔案中,找到key資料的位置,確認key是否以正確的產生即可。同步發表於
2013年7月3日 星期三
2013年7月2日 星期二
2013年6月9日 星期日
Laravel 4 PHP Framework繁體中文教學文件
Laravel的目標在於使開發者在沒有犧牲應用程式功能為前提,讓開發過程是愉悅的。快樂的開發者能夠做出最好的程式,為了這個目標,我們試圖去整合我們看過其他網頁框架中最佳的優點,包括其他語言開的網頁框架,像是 Ruby on Rails 、 ASP.NET MVC 及 Sinatra。
Laravel 是容易入門的,但卻是功能強大,提供健壯網頁應用程式強大的工具,一個極好的反轉控制容器(IoC),語意表達式的 Migration 系統,支援緊密整合的單元測試,給你需要的工具去,建造你工作上的任何網頁應用程式。
Laravel 4 PHP Framework繁體中文教學文件 :
Github Page
http://kejyun.github.io/Laravel-4-Documentation-Traditional-Chinese/docs/introduction/備用站
訂閱:
文章 (Atom)



