コード例 #1
0
 /**
  * Remove the specified Element from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $element = $this->elementRepository->find($id);
     if (empty($element)) {
         Flash::error('Element not found');
         return redirect(route('elements.index'));
     }
     $this->elementRepository->delete($id);
     Flash::success('Element deleted successfully.');
     return redirect(route('elements.index'));
 }
コード例 #2
0
 public function searchBy($term)
 {
     $elements = $this->elementRepository->search($term);
     header("Access-Control-Allow-Origin:" . $this->clientURL);
     return $this->sendResponse($elements, "Elements retrieved successfully");
 }
コード例 #3
0
 /**
  * undocumented function
  *
  * @return void
  * @author 
  **/
 public function createInside($id)
 {
     $container = $this->elementRepository->find($id);
     return view('files.create-here')->with('container', $container);
 }