Esempio n. 1
0
 /**
  * parse xml
  *
  * @param Request $request
  * @return \BladeView|bool|\Illuminate\View\View
  */
 public function loadXml(Request $request)
 {
     if ($file = $request->file('xml')) {
         if ($file->getMimeType() == 'application/xml') {
             $this->url = $file->move('xml/' . file::_get_path(), $file->getFilename());
             $this->_parce($this->url);
             Logs::_create('User parse XML ' . $this->url);
             $this->data->file_name = $file->getFilename();
             return view('admin.xml.view', ['data' => $this->data]);
         } else {
             return view('admin.xml.loadxml')->with(['error' => 'No type file']);
         }
     } else {
         return view('admin.xml.loadxml');
     }
 }
Esempio n. 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param $user
  * @return Response
  */
 public function delete(User $user)
 {
     Logs::_create('User deleted ' . $user->name);
     $user->delete();
     return redirect()->back();
 }
Esempio n. 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param $id
  * @return Response
  */
 public function delete(Language $language)
 {
     Logs::_create('User deleted language ' . $language->name);
     $language->delete();
     return redirect()->back();
 }