当前位置: 首页>>代码示例>>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;未经允许,请勿转载。