Exemple #1
0
 public function getAvalaibleTemplate()
 {
     $maxtemplate = EmailTemplate::all()->count();
     $templateTarget = 1;
     while ($templateTarget <= $maxtemplate) {
         if ($this->templateExist($templateTarget)) {
             $templateTarget++;
         } else {
             return $templateTarget;
         }
     }
     return 0;
 }
 public function sendEmail()
 {
     $contacts = Contact::where('user_id', Auth::user()->id)->lists('full_name', 'id');
     $templates = EmailTemplate::lists('subject', 'id');
     $list_templates = EmailTemplate::all();
     return View::make('users.send', compact('contacts', 'templates', 'list_templates'));
 }
 public function index()
 {
     $emailtemplates = EmailTemplate::all();
     return View::make('email_templates.index', compact('emailtemplates'));
 }