public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         EmailHistory::create([]);
     }
 }
示例#2
0
 public function saveHistory($status, $member_id, $template_id)
 {
     $emailHistory = new EmailHistory();
     $emailHistory->template_id = $template_id;
     $emailHistory->member_id = $member_id;
     $emailHistory->contact_id = $this->id;
     $emailHistory->status = $status;
     $emailHistory->date_sent = date('Y-m-d H:i:s');
     $emailHistory->save();
     $this->last_follow_up = date('Y-m-d H:i:s');
     $this->save();
 }
示例#3
0
 public function showOutbox()
 {
     $emailHistory = EmailHistory::where('member_id', Auth::user()->id)->get();
     // return $emailHistory->toJson();
     return View::make('users.outbox')->with('email_histories', $emailHistory);
 }
 /**
  * Display a listing of the resource.
  * GET /emailhistories
  *
  * @return Response
  */
 public function index()
 {
     $email_histories = EmailHistory::all();
     return View::make('email_history.index', compact('email_histories'));
 }