示例#1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\ContactsRequest  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Contact $contact, ContactsRequest $request)
 {
     $this->checkAuthorization($contact);
     // return $contact;
     $contact->update($request->all());
     return redirect()->route('admin.contacts.index')->withSuccess("El contacto {$contact->name} ha sido actualizado de manera correcta!");
 }
 public function store(ContactsRepository $contacts_control, ContactsRequest $request)
 {
     $contacts_control->store($request->all());
     $req = $request->all();
     // print $req[email];// Почта!!!
     // {{config('mail.username')}}
     /*
            \Mail::raw('Текст письма', function($message)
     {
         $message->from('*****@*****.**', 'Astrologo');
         $message->to('*****@*****.**');
     });
     */
     return redirect('contacts')->with('ok', trans('astro/contacts.ok'));
 }