/**
  * Display a listing of the Element.
  * GET|HEAD /elements
  *
  * @return Response
  */
 public function index()
 {
     try {
         $elements = $this->elementRepository->all();
         header("Access-Control-Allow-Origin:" . $this->clientURL);
         return $this->sendResponse($elements, "Elements retrieved successfully");
     } catch (Exception $e) {
         echo 'Excepción capturada: ' . $e->getMessage(), "\n";
     }
 }
示例#2
0
 /**
  * Show the form for creating a new File.
  *
  * @return Response
  */
 public function create()
 {
     $datas = $this->elementRepository->all();
     $containers = array();
     foreach ($datas as $data) {
         if ($data->identifier != "") {
             $containers[$data->id] = $data->identifier;
         }
     }
     return view('files.create', compact('containers'));
 }
示例#3
0
 /**
  * Display a listing of the Element.
  *
  * @return Response
  */
 public function viewall()
 {
     $elements = $this->elementRepository->all();
     return view('elements.viewall')->with('elements', $elements);
 }