コード例 #1
0
ファイル: FlyersController.php プロジェクト: emptyWang/flyer
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash()->success('Success', 'Your flyer has been created!');
     return redirect(flyer_path($flyer));
     //temporary
 }
コード例 #2
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     Flyer::create($request->all());
     session()->flash('flash_message', 'Flyer successfully created');
     // flash messaging
     //return redirect()->back();
 }
コード例 #3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     //        Flyer::create($request->all());
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash('Success!', 'Your flyer has been created.');
     return redirect(flyer_path($flyer));
 }
コード例 #4
0
 public function store(FlyerRequest $request)
 {
     // Create the flyer
     Flyer::create($request->all());
     flash()->success('Success', 'The Flyer was created!');
     return redirect()->back();
 }
コード例 #5
0
ファイル: FlyersController.php プロジェクト: kchimbo/flyer
 public function store(Requests\FlyerRequest $request)
 {
     //var_dump($request);
     Flyer::create($request->all());
     //flash('Flyer successfully created!');
     return redirect()->back();
 }
コード例 #6
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     // Flyer::create($request->all(), Auth::user()->name);
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash()->success('Flyer Created', 'Your flyer has been created.');
     return redirect(flyer_path($flyer));
 }
コード例 #7
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $reqest
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\FlyerRequest $request)
 {
     //create the flyer
     \App\Flyer::create($request->all());
     flash('Create with success', 'Success!');
     return redirect()->back();
 }
コード例 #8
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     $flyer = $this->user->publish(new Flyer($request->all()));
     // flash messaging
     flash('Success!', 'Your flyer has been created!');
     return redirect(flyer_path($flyers));
 }
コード例 #9
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     Flyer::create($request->all());
     // flash('Success','Your flyer has been created');
     flash()->success('Success', 'Your flyer has been created');
     return redirect()->back();
 }
コード例 #10
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     Flyer::create($request->all());
     flash()->success('Success!', 'Your flyer is created, great Job!.');
     return redirect()->back();
     // temporary
 }
コード例 #11
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     //persist the flyer data
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash()->success('Success!', 'Your flyer has been created!');
     return redirect(flyer_path($flyer));
 }
コード例 #12
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request, Flash $flash)
 {
     Flyer::create($request->all());
     flash()->success('success!', 'your flyer has been created');
     return redirect()->back();
     //temporary
 }
コード例 #13
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     $flyer = Flyer::create($request->all());
     Auth::user()->publish(new Flyer($request->all()));
     flash('info', 'Flyer successfully saved');
     return redirect(flyer_path($flyer));
 }
コード例 #14
0
 public function store(Requests\FlyerRequest $request)
 {
     Flyer::create($request->all());
     // session()->flash('flash_message','Flyer successfully created!');
     //flash('Success', 'Your flyer has been created');
     flash()->success('Success!', 'Your flyer has been created.');
     return redirect()->back();
 }
コード例 #15
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     // attach a user to a flyer
     $flyer = $this->user->publish(new Flyer($request->all()));
     // flash messaging
     flash()->success('Woohoo', 'Flyer successfully created!');
     return redirect(flyer_path($flyer));
 }
コード例 #16
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     Flyer::create($request->all());
     //validate the form
     flash()->success('Success', 'Your flyer has been created.');
     // flash success message
     return redirect()->back();
     //temporary redirection to home page.
 }
コード例 #17
0
ファイル: FlyerController.php プロジェクト: rrubiorr81/flyer
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     //persist
     Flyer::create($request->all());
     //flash
     flash("Sucess", "Your Flyer has been created");
     //redirect to home...
     return redirect()->back();
 }
コード例 #18
0
 public function store(FlyerRequest $request)
 {
     //persist the flyer
     Flyer::create($request->all());
     //flash messaging
     flash()->success('Success', 'Flyer was inserted with success!');
     //redirect to landing page
     return redirect()->back();
 }
コード例 #19
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     //persist the flyer
     Flyer::create($request->all());
     //flash a message
     flash()->success('Success!', 'Your flyer has been created.');
     //redirect to the landing page
     return redirect()->back();
     //temporary
 }
コード例 #20
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     //Validation wird im FlyerRequest gemacht
     Flyer::create($request->all());
     flash()->Success('Success', 'Your Flyer has been successfull saved in our DB');
     return redirect()->back();
     //temporary
     //persist
     //redirect to a landing page
 }
コード例 #21
0
 public function store(FlyerRequest $request)
 {
     //persist flyer
     //Flyer::create($request->all());
     $flyer = $this->user->publish(new Flyer($request->all()));
     // flash messaging
     flash()->success('Success!', 'Your flyer has been created.');
     //redirect to landing page
     // return redirect()->back();
     return redirect(flyer_path($flyer));
 }
コード例 #22
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     //persist the flyer
     //Flyer::create($request->all());
     $flyer = $this->user->publish(new Flyer($request->all()));
     //flash messaging
     flash()->success('Success!', 'Your flyer has been created.', "info");
     //return view('pages.home');//temporary redirect the landing page
     //return redirect()->back();
     return redirect($flyer->zip . '/' . str_replace(' ', '-', $flyer->street));
 }
コード例 #23
0
 /**
  * Store a newly created resource in storage..gitignore
  *
  *
  * @param FlyerRequest $request
  *
  * @return \Response
  */
 public function store(FlyerRequest $request)
 {
     //        Flyer::create($request->all());
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash()->success('Success!', 'Your flyer has been created!');
     // redirect to landing page
     //        return redirect()->back();
     //        return redirect()->route('flyer_path', [$flyer->zip, $flyer->address]);
     //        return redirect($flyer->zip . '/' . str_replace(' ', '-', $flyer->address));
     //        return redirect($flyer->path());
     return redirect(flyer_path($flyer));
 }
コード例 #24
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\FlyerRequest $request)
 {
     // Notice the validation is being done through the custom Request in the above parameter
     // This method won't get triggered if the Request doesn't pass validation in the FlyerRequest.php file
     Flyer::create($request->all());
     flash()->overlay("Success!", "Listing successfully created.");
     // We've created "flash" as a global function in app/helpers.php
     // where it accesses the class and object we've created
     // in app/http called Flash.php
     flash('Flyer successfully created!');
     $street = $street = str_replace('-', ' ', $request->street);
     return redirect($request->zip . '/' . $street);
 }
コード例 #25
0
ファイル: FlyersController.php プロジェクト: qtheninja/flyer
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\FlyerRequest  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Requests\FlyerRequest $request)
 {
     //
     // validate form
     //$this->validate();
     //USING FlyerRequest to Validate
     // persist flyer
     Flyer::create($request->all());
     //flash messaging
     flash('Success', 'Flyer successfully created!');
     // redirect to landing page or the flyer
     return redirect()->back();
 }
コード例 #26
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     // validate the form
     // this is done through FlyerRequest not here
     // persist the flyer
     // that'll be an array that maps to the columns
     //Flyer::create($request->all());
     // need to link the user to the flyer
     // get my currently authenticated user and i want them to publish a new flyer
     $flyer = $this->user->publish(new Flyer($request->all()));
     // flash messaging
     // session()->flash('flash_message', 'Flyer sucessfully created!');
     flash()->success('Success!', 'Your flyer has been created.');
     // goal: we need to redirect to the completed flyer where they can add photos
     // we want to send them to /$flyer->zip/$flyer->street
     // option 1
     // return redirect($flyer->zip . '/'. str_replace(' ', '-', $flyer->street));
     // option 2 create a named route and then we would pass in whats necessary
     // return redirect()->route('flyer_path', [$flyer->zip, $flyer->street]);
     // option 3 NOT RECOMMENDED! add a method directly onto your flyer model.
     // technically probably something you shouldn't do and not the best practice.
     // so in flyer.php we woudld do
     // public function path()
     // {
     //     return redirect($this->zip . '/'. str_replace(' ', '-', $this->street));
     // }
     // and then one benefit is in the flyersController we can now say redirect to the flyer path
     // and the flyer model would be responsible for what its companion uri would be
     // return redirect($flyer->path());
     // option 4, you can always create little helper functions and this can be useful
     // you could say redirect to the flyer path and then you would pass in the flyer here
     // and if that is something you woudl reference throughout this entire project like you are always
     // linking to a particular file then this would be very helpful
     // we autoload a app/helpers.php file in our "files" portion of the composer.json
     return redirect(flyer_path($flyer));
 }
コード例 #27
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     Flyer::create($request->all());
     flash()->success('success', 'Flyer successfully created !', 'success');
     return redirect()->back();
 }
コード例 #28
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  App\Http\Requests\FlyerRequest  $request
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     Flyer::create($request->all());
     flash()->success("Great!", "The flyer has been created C:");
     return redirect()->route('flyers.index');
 }
コード例 #29
0
 /**
  * Store a newly created resource in storage.
  *
  * @param FlyerRequest|Request $request
  *
  * @return \Illuminate\Http\Response
  */
 public function store(FlyerRequest $request)
 {
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash()->success('Success!', 'Flyer successfully has been created.');
     return redirect(flyer_path($flyer));
 }
コード例 #30
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  FlyerRequest  $request
  * @return Response
  */
 public function store(FlyerRequest $request)
 {
     $flyer = $this->user->publish(new Flyer($request->all()));
     flash('Success!', 'Your flyer was created');
     return redirect($flyer->zip . '/' . str_replace(' ', '-', $flyer->street));
 }