/** * Ask the user to confirm the DMCA that will be delivered * @param Requests\PrepareNoticeRequest $request * @param Guard $auth * @return \Responce */ public function confirm(Requests\PrepareNoticeRequest $request, Guard $auth) { $template = $this->compiledDmcaTemplate($data = $request->all(), $auth); session()->flash('dmca', $data); $template = view()->file(app_path('Http/Templates/dmca.blade.php')); return view('notices/confirm', compact('template')); }
public function confirm(PrepareNoticeRequest $request) { $data = $request->all() + ['name' => $this->user->name, 'email' => $this->user->email]; session()->flash('dmca', $data); $template = view()->file(app_path('Http/Templates/dmca.blade.php'), $data); return view('pages.notices.confirm', compact('template')); }
public function confirm(Requests\PrepareNoticeRequest $request, Guard $auth) { $template = $this->compileDmcaTemplate($data = $request->all(), $auth); // ? session()->flash('dmca', $data); return view('notices.confirm', compact('template')); }
public function confirm(PrepareNoticeRequest $request, Guard $auth) { //dd($request->all()); $template = $this->compileDmcaTemplate($data = $request->all(), $auth); session()->flash('dmca', $data); //dd($template); return view('notices.confirm')->with('template', $template); }
/** * Ask the user to confirm the DMCA that will be delivered. * * Once validation has passed via the PrepareNoticeRequest, show all data entered by the user via the form. * * @param PrepareNoticeRequest $request * @return array */ public function confirm(PrepareNoticeRequest $request) { $template = $this->compileDmcaTemplate($data = $request->all()); // store the request data, $data, into the _SESSION super global, just for one page request. session()->flash('dmca', $data); //dd("im here"); // send the derived view to the below view. return view('notices.confirm', compact('template')); }
/** Buildout the Template, goto the Auth Middleware object and get all the credentials the user has, leverage his name and email into the template we are building. * @param PrepareNoticeRequest $request * @param Guard $auth * @return mixed */ public function compileDmcaTemplate(PrepareNoticeRequest $request, Guard $auth) { $data = $request->all(); // Our data is request with some additional information the view needs, we consult the auth middleware I passed to the method. $data = $data + ['Name' => $auth->user()->name, 'Email' => $auth->user()->email]; // Creates a view specifically for the file dmca.blade.php $template = view()->file(app_path('Http/Templates/dmca.blade.php'), $data); // Notice that this is ALL you need to do to place needed information into a page. Pass a view with a {{ $variable }} reference and the reference is replaced with the variable name in the $data variable passed. return $template; }
public function confirm(Requests\PrepareNoticeRequest $request) { // "$this->user" defined in parent controller // public function confirm(Requests\PrepareNoticeRequest $request, Guard $auth) {// using method injection for getting "Guard $auth" /* // public function confirm(Requests\PrepareNoticeRequest $request) { $data = $request->all()+[ // 'name' => \Auth::user()->name, // 'email' => \Auth::user()->email, 'name' => $auth->user()->name, 'email' => $auth->user()->email, ]; $template = view()->file(app_path('Http/Templates/dmca.blade.php'), $data);// specifying path to file to be used as view*/ $data = $request->all(); $template = $this->compileDmcaTemplate($data); // "$this->user" defined in parent controller //$template = $this->compileDmcaTemplate($data, $auth); session()->flash('dmca', $data); return view('notices/confirm', compact('template')); }
public function confirm(PrepareNoticeRequest $request) { $template = $this->compileDmcaTemplate($data = $request->all()); session()->flash('dmca', $data); return view('notices/confirm', compact('template')); }
/** * Compile the DMCA template from the form data. * * @param PrepareNoticeRequest $request * @param Guard $auth * @return \Illuminate\Contracts\View\View */ protected function compileDmcaTemplate(PrepareNoticeRequest $request) { $data = $request->all() + ['name' => $this->user->name, 'email' => $this->user->email]; return view()->file(app_path('Http/Templates/dmca.blade.php'), $data); }
public function confirm(PrepareNoticeRequest $request, Guard $auth) { $template = $this->compileDmcaTemplate($request->all(), $auth); return view('notices.confirm', compact('template')); }