本文整理汇总了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));
}
示例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');
示例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]);
}