Ejemplo n.º 1
0
 public function edit($id)
 {
     $project = Portfolio::findOrFail($id);
     return view('larapress::portfolio.edit')->with('project', $project);
 }
Ejemplo n.º 2
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Request $request)
 {
     $project = Portfolio::create(['title' => $request->title, 'description' => $request->description, 'slug' => str_slug($request->slug), 'body' => $request->body, 'status' => $request->status, 'website' => $request->website, 'launched_date' => $request->launched_date, 'cover_image' => $request->cover_image]);
     \Session::flash('success', 'Your project has been saved.');
     event(new \Larapress\Portfolio\Events\PortfolioWasSaved($project));
 }
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Request $request)
 {
     $project = Portfolio::findOrFail($this->id);
     $project->update(['title' => $request->title, 'description' => $request->description, 'body' => $request->body, 'status' => $request->status, 'website' => $request->website, 'launched_date' => $request->launched_date, 'cover_image' => $request->cover_image]);
     \Session::flash('success', 'Your project has been updated successfully');
 }