Esempio n. 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $this->validate($request, ['client' => 'required|unique:projects|max:255', 'image' => 'required']);
     $image = ImageuploadFacade::upload($request->file('image'));
     $project = new Client();
     $project->client = $request->input('client');
     $project->image = $image['basename'];
     $project->image_ext = $image['original_extension'];
     $project->save();
     return back();
 }
Esempio n. 2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $this->validate($request, ['name' => 'required|unique:projects|max:255', 'quote' => 'required', 'company' => 'required', 'image' => 'required']);
     $image = ImageuploadFacade::upload($request->file('image'));
     $project = new Quote();
     $project->name = $request->input('name');
     $project->quote = $request->input('quote');
     $project->company = $request->input('company');
     $project->title = $request->input('title');
     $project->image = $image['basename'];
     $project->image_ext = $image['original_extension'];
     $project->save();
     return back();
 }