當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Draft::find方法代碼示例

本文整理匯總了PHP中Draft::find方法的典型用法代碼示例。如果您正苦於以下問題:PHP Draft::find方法的具體用法?PHP Draft::find怎麽用?PHP Draft::find使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Draft的用法示例。


在下文中一共展示了Draft::find方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: edit

 public static function edit($id)
 {
     self::check_logged_in();
     $draft = Draft::find($id);
     View::make('drafts/edit.html', array('attributes' => $draft));
 }
開發者ID:sasumaki,項目名稱:Tsoha-Bootstrap,代碼行數:6,代碼來源:DraftController.php

示例2: function

 Route::get('dashboard/emails/{id}/forward', 'EmailController@forward');
 Route::resource('dashboard/emails-resource/sent', 'SentEmailResourceController');
 Route::get('dashboard/emails-custom/share/{id}', 'SentEmailCustomController@share');
 Route::get('dashboard/emails-custom/pdf/{id}', 'SentEmailCustomController@pdf');
 Route::get('dashboard/emails/drafts', 'EmailController@drafts');
 Route::get('dashboard/emails/drafts/{id}/edit', 'EmailController@edit_draft');
 Route::resource('dashboard/emails-resource/drafts', 'DraftResourceController');
 Route::get('dashboard/emails/trash', 'EmailController@trash');
 Route::resource('dashboard/emails-resource/trash', 'TrashResourceController');
 Route::get('email/backend-show/{id}', function ($id) {
     if ($email = Email::find($id)) {
     }
     return View::make('backend.emails.send_templates.backend-show', ['email_body' => $email->email_body, 'email_id' => $id]);
 });
 Route::get('draft/backend-show/{id}', function ($id) {
     if ($email = Draft::find($id)) {
     }
     return View::make('backend.emails.send_templates.backend-draft-show', ['email_body' => $email->email_body, 'email_id' => $id]);
 });
 /*****************PAGES*******************/
 Route::get('dashboard/pages', 'PageController@index');
 Route::get('dashboard/pages/trash', 'PageController@deleted_pages');
 Route::get('dashboard/pages/create', 'PageController@create');
 Route::get('dashboard/pages/{id}/edit', 'PageController@edit');
 Route::get('dashboard/pages/{id}/delete', 'PageController@delete');
 Route::get('dashboard/pages/{id}/restore', 'PageController@restore');
 Route::get('dashboard/pages/{id}/destroy', 'PageController@destroy');
 /*****************TAGS************************************/
 Route::get('dashboard/tags', 'TagController@index');
 Route::get('dashboard/tags/create', 'TagController@create');
 Route::get('dashboard/tags/{id}/edit', 'TagController@edit');
開發者ID:shinichi81,項目名稱:Nifty-Newsletter,代碼行數:31,代碼來源:routes.php

示例3: edit_draft

 public function edit_draft($id)
 {
     $email_configs = ['from_name' => Setting::getFromName($this->user), 'from_email' => Setting::getFromEmail($this->user), 'reply_to_email' => Setting::getReplyToEmail($this->user)];
     $tag_list = Tag::getTagList();
     $subscribers = Subscriber::getSubscribersForEmail();
     $subsArr = [];
     foreach ($subscribers as $subscriber) {
         $subsArr[$subscriber->email] = $subscriber->first_name . ' ' . $subscriber->last_name . '(' . $subscriber->email . ')';
     }
     $maillists = Maillist::getMaillistsForEmail();
     $listsArr = [];
     foreach ($maillists as $maillist) {
         $listsArr[$maillist->id] = $maillist->name . ' (' . count($maillist->subscribers) . ' subscribers)';
     }
     $email = Draft::find($id);
     return View::make('backend.emails.edit-draft', ['user' => $this->user, 'isAdmin' => $this->isAdmin, 'configs' => $this->configs, 'logged_in_for' => $this->logged_in_for, 'activeParent' => $this->activeParent, 'active' => 'createemails', 'subscribers' => $subsArr, 'mail_lists' => $listsArr, 'email_configs' => $email_configs, 'tag_list' => $tag_list, 'email' => $email]);
 }
開發者ID:shinichi81,項目名稱:Nifty-Newsletter,代碼行數:17,代碼來源:EmailController.php


注:本文中的Draft::find方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。