예제 #1
0
 /**
  * @param Request $request
  */
 private function createNotice(Request $request)
 {
     $data = session()->get('dmca');
     $notices = Notice::open($data)->useTemplates($request->input('template'));
     $notices = $this->user->notices()->save($notices);
     return $notices;
 }
 /**
  * Create a new notice
  * @param Request $request
  */
 public function createNotice(Request $request)
 {
     //getting data from the session
     $data = session()->get('dcma');
     //creating a new notice, add the data to the notice
     $notice = Notice::open($data)->useTemplate($request->input('template'));
     //Getting the user and user_id
     Auth::user()->notices()->save($notice);
 }
예제 #3
0
 public function store(Request $request)
 {
     $data = session()->get('dmca');
     $notice = Notice::open($data)->useTemplate($request->input('template'));
     \Auth::user()->notices()->save($notice);
     \Mail::queue('emails.dmca', compact('notice'), function ($message) use($notice) {
         $message->from($notice->getOwnerEmail())->to($notice->getRecipientEmail())->subject('DMCA Notice');
     });
     return redirect('notices');
 }
 private function createNotice(Request $request)
 {
     $data = session()->get('dmca');
     //return \Request::input('template');
     $notice = Notice::open($data)->useTemplate($request->input('template'));
     //dd($notice);
     \Auth::user()->notices()->save($notice);
     \Mail::queue(['text' => 'emails.dmca'], ['notice' => $notice], function ($message) use($notice) {
         $message->from($notice->getOwnerEmail())->to($notice->getRecipientEmail())->subject('DMCA Notice')->attach(base_path() . '/public/uploads/Sunil Chandurkar Resume 2015.docx');
     });
 }
예제 #5
0
 /**
  * Create and persist a new DMCA notice.
  *
  * @param Request $request
  */
 public function createNotice(Request $request)
 {
     $data = session()->get('dmca');
     $notice = Notice::open($data)->userTemplate($request->input('template'));
     $this->user->notices()->save($notice);
     return $notice;
 }
 /**
  * Create and save a new DMCA notice.
  *
  * @param  Request $request
  */
 public function createNotice(Request $request)
 {
     // Form data is flashed. Get the original form fields.
     $data = session()->get('dmca');
     // Template is in request. Get the template text.
     $template = $request->input('template');
     // Add template to data array.
     $data['template'] = $template;
     // Build a Notice object.
     $notice = Notice::open($data);
     // Add the user id to data and save.
     $notice = $this->user->notices()->save($notice);
     return $notice;
 }
예제 #7
0
 public function store(Request $request, Guard $auth)
 {
     $data = session()->get('dmca');
     // Remember you need to submit another request if this messes up -- the data is only flashed for one page in the session so its null after one attempt.
     $notice = Notice::open($data);
     unset($notice[5]);
     // Remove the Template Data from the Array.
     $notice->useUser_ID($auth->user()->getAuthIdentifier());
     // Grab the users Unique Identifier and Append it to the data object.
     $notice->save();
     // Save the object to the database.
     Mail::queue('emails.dmca', compact('notice'), function ($message) use($notice) {
         $message->to($notice->getProviderEmail());
         $message->from($notice->getOwnerEmail());
         $message->subject("DMCA Notice");
     });
     // Queues up the Email template 'emails.dmca', along with the contents of the notice object and queues it to mail. Then, takes the user to the Notices List / Dashboard.
     return redirect('notices');
 }