예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(ClientRequest $request)
 {
     $input = $request->all();
     $this->clientRepo->store($input);
     Flash('Client Created');
     return Redirect()->route('clients');
 }
예제 #2
0
 public function update(Client $client, ClientRequest $request)
 {
     //Client $client refrences a Route Model Binding method found is RouteServiceProvider.php
     $client->update($request->all());
     \Session::flash('flash_message', 'Client ' . $client->first_name . ' ' . $client->last_name . ' was updated.');
     return redirect('clients');
 }
예제 #3
0
 /**
  * Update the specified resource in storage.
  * @param  \Illuminate\Http\Request $request
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function update(ClientRequest $request, $id)
 {
     $client = Client::findOrFail($id);
     $client->fill($request->all());
     $client->save();
     return redirect(route('clients.index'))->with('message', 'Cliente actualizado corectamente');
 }
예제 #4
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(ClientRequest $request, $id)
 {
     $Client = Client::find($id);
     $Client->fill($request->all());
     $Client->save();
     Flash::success('Se ha editado a ' . $Client->nombre . '.');
     return redirect()->route('clientes.index');
 }
예제 #5
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(ClientRequest $request)
 {
     //dd($request->all());
     $Cliente = new Cliente($request->all());
     $Cliente->estatus = $request->estatus;
     $Cliente->save();
     Flash::success('Se ha registrado exitosamente el cliente: ' . $Cliente->nombre);
     return redirect()->route('Admin.Clients.index');
 }
예제 #6
0
 public static function update(ClientRequest $request, $id)
 {
     $user = User::find($id);
     if (!$user) {
         return redirect()->back()->withErrors('No se encontro el usuario solicitado');
     }
     $user->password = Hash::make($request->input('password'));
     $user->name = $request->input('name');
     $user->lastname = $request->input('lastname');
     $user->email = $request->input('email');
     $user->save();
     return redirect()->route('home.index')->with('success', 'El usuario se ha modificado correctamente');
 }
예제 #7
0
 /**
  * Update the specified resource in storage.
  *
  * @return \Illuminate\Http\Response
  */
 public function update(ClientRequest $request, $slug)
 {
     $client = Client::where(compact('slug'))->firstOrFail();
     $client_request = $request->except('tabs');
     $client->update($client_request);
     Toastr::success("Saved changes");
     $tabs = explode(':', $request->get('tabs'));
     return redirect('/client/' . $client->slug . '/' . $tabs[0] . '/' . $tabs[1]);
 }
예제 #8
0
 public function update($id, ClientRequest $request)
 {
     $client = Client::findOrFail($id);
     $client->update($request->all());
     $client->save();
     return redirect('client');
 }
예제 #9
0
 public function update(ClientRequest $request, $id)
 {
     $user = Clients::find($id);
     $user->update($request->all());
     return redirect('clients');
 }
예제 #10
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int      $id
  * @return Response
  */
 public function edit(ClientRequest $request)
 {
     $client = $request->entity();
     $data = ['client' => $client, 'method' => 'PUT', 'url' => 'clients/' . $client->public_id, 'title' => trans('texts.edit_client')];
     $data = array_merge($data, self::getViewModel());
     if (Auth::user()->account->isNinjaAccount()) {
         if ($account = Account::whereId($client->public_id)->first()) {
             $data['planDetails'] = $account->getPlanDetails(false, false);
         }
     }
     return View::make('clients.edit', $data);
 }
예제 #11
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(ClientRequest $request, $id)
 {
     $client = Client::find($id);
     $client->update($request->all());
     return redirect()->route('admin.clients.index')->with('message', "{$client->name} updated");
 }
예제 #12
0
 /**
  * Store a new client
  */
 public function store(ClientRequest $request)
 {
     $client = Client::create($request->all());
     flash()->success('Created!', $client->name . ' has been created.');
     return back();
 }
 public function ssdd(ClientRequest $request)
 {
     $c = new Clients();
     $c->fname = $request->input("fn");
     $c->lname = $request->input("ln");
     $c->email = $request->input("email");
     $c->country = $request->input("country");
     $c->state = $request->input("state");
     $c->city = $request->input("city");
     $c->zip = $request->input("zip");
     $c->phone = $request->input("phone");
     $c->dob = $request->input("dob");
     $c->gender = $request->input("gender");
     Log::info('This is some useful information.');
     $c->category = $request->input("category");
     $c->talent = $request->input("talent");
     $c->portfolio = $request->input("portfolio");
     $c->audio = $request->input("audio");
     $c->video = $request->input("video");
     $c->desc = $request->input("desc");
     $c->opportunities = $request->input("opportunities");
     $c->representation = $request->input("representation");
     $c->talentdev = $request->input("talentdev");
     $c->genserv = $request->input("genserv");
     $c->vanityluxury = $request->input("vanityluxury");
     $c->additional = $request->input("additional");
     $c->save();
     return back()->withInput();
 }
 /**
  * @SWG\Get(
  *   path="/clients/{client_id}",
  *   summary="Individual Client",
  *   tags={"client"},
  *   @SWG\Response(
  *     response=200,
  *     description="A single client",
  *      @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Client"))
  *   ),
  *   @SWG\Response(
  *     response="default",
  *     description="an ""unexpected"" error"
  *   )
  * )
  */
 public function show(ClientRequest $request)
 {
     return $this->itemResponse($request->entity());
 }
예제 #15
0
 /**
  * Update an existing client
  *
  * @param ClientRequest $request The incoming request.
  * @param integer       $id      A client primary key.
  *
  * @return Response
  */
 public function update(ClientRequest $request, $id)
 {
     $client = Client::find($id);
     $affectedRows = $client->update($request->all());
     $userMessage = $this->userMessageForAffectedRows($affectedRows);
     return redirect()->route('client.show', [$client->id])->with('userMessage', $userMessage);
 }
예제 #16
0
 /**
  * Update the specified resource in storage.
  *
  * @param  ClientRequest  $request
  * @param  int  $id
  * @return Response
  */
 public function update(ClientRequest $request, $id)
 {
     $client = Client::findOrFail($id);
     if ($request->hasFile('logo')) {
         $image_name = $request->cid . '.' . $request->file('logo')->getClientOriginalExtension();
         $request->file('logo')->move(base_path() . '/resources/assets/images/client', $image_name);
         $data = $request->except('logo');
         $data['logo'] = $image_name;
         $client->update($data);
     } else {
         $client->update($request->except('logo'));
     }
     Session::flash('success_message', 'Client Updated Successfully');
     return redirect('client/' . $request->id);
 }