/**
  * Store a newly created SubResourceDetail in storage.
  *
  * @param CreateSubResourceDetailRequest $request
  *
  * @return Response
  */
 public function store(CreateSubResourceDetailRequest $request)
 {
     $input = $request->all();
     $input['objectId'] = 'SubResDetail' . str_random(100);
     $subResourceDetail = $this->subResourceDetailRepository->create($input);
     Flash::success('SubResourceDetail saved successfully.');
     return redirect(route('subResourceDetails.index'));
 }
 /**
  * Store a newly created SubResourceDetail in storage.
  * POST /subResourceDetails
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(Request $request)
 {
     if (sizeof(SubResourceDetail::$rules) > 0) {
         $this->validateRequestOrFail($request, SubResourceDetail::$rules);
     }
     $input = $request->all();
     $input['objectId'] = 'SubResDetail' . str_random(10);
     $subResourceDetails = $this->subResourceDetailRepository->create($input);
     return $this->sendResponse($subResourceDetails->toArray(), "SubResourceDetail saved successfully");
 }