public function digitusmarketing() { $apicode = Config::get('realtimeapicode.digitusapi'); $response = Response::make(null, 200); $response->header('realtimeapi', $apicode); // Log::info(Input::all()); $entries = Input::get('entries'); if (!empty($entries)) { $entriess = json_decode($entries); foreach ($entriess as $entry) { $ebook = Ebook::where('active', '1')->first(); if ($ebook) { $ebook->downloads = $ebook->downloads + 1; $ebook->save(); } $data = array('naam' => $entry->naam, 'bedrijfsnaam' => $entry->bedrijfsnaam, 'email' => $entry->email, 'telefoon' => $entry->telefoon, 'ebooktitel' => $ebook->naam); // Mail::send('includes.email.tab-app.maartenvazquez', $data, function($message) use($data) // { // $message->from($data['email'], $data['voornaam'] .' '. $data['achternaam']); // $message->to('*****@*****.**', 'Maarten Vazquez Creatiestudio') // ->subject('Maarten Vazquez Tab-app Actie'); // }); Mail::send('includes.email.tab-app.digitusmarketing', $data, function ($message) use($data) { $message->from($data['email'], $data['naam']); $message->to('*****@*****.**', 'Digitus Marketing')->subject('HETE LEAD!!'); }); } } return $response; }
public function findOrFail($id) { return Ebook::findOrFail($id); }
public function getBedankt10Stappen(Ebook $book) { $ebook = $book->where('id', '1')->first(); return view('ebooks.ebookbedankt', compact('ebook')); }