Yii CRUDページの操作

CRUD ページにアクセス

■管理者でログインする

http://localhost/sample/index.php?r=user/にアクセスする。

『Login』または『Operations』のどれかをクリックする。

yii010

『Username』に”admin”、『Password』に”admin”を入力して『Login』をクリック
※ログイン情報はprotected/components/useridentity.phpにて定義されている。

yii011

■データ作成

http://localhost/sample/index.php?r=user/createにアクセス

データを入力して『Create』をクリックする。

yii012

■データ一覧

http://localhost/sample/index.php?r=user/indexにアクセス

件数の増減によってページング処理する。

yii013

■データ参照

http://localhost/sample/index.php?r=user/view&id=【参照するID】にアクセス

【参照するID】の詳細情報を表示する。

yii014

■データ更新

http://localhost/sample/index.php?r=user/update&id=【更新するID】にアクセス

【更新するID】のデータを入力して『Save』をクリックする。

yii015

■データ削除
『データ参照ページ』か後述する『管理者ページ』で削除リンクをクリックする。
『OK』ボタンクリックでデータ削除

yii016

■管理者ページ

http://localhost/sample/index.php?r=user/adminにアクセス

『Advanced Search』のリンクをクリックすると絞込検索ができる。

yii017

参考サイト:
http://www.yiiframework.com/doc/guide/1.1/ja/quickstart.first-app

Comments are closed.