src/Http/Controllers/ApiController.php
public function store(ApiStoreRequest $request, $crudeName)
    {
        $this->crude = CrudeInstance::get($request->crudeName);

        $model = $this->crude->store($request->all());

        return $this->successResponse([
            'model' => $model,
            'message' => $this->crude->getCrudeSetup()->trans('item_has_been_saved')
        ]);
    }
public function store(ApiStoreRequest $request, $crudeName)
    {
        $this->crude = CrudeInstance::get($request->crudeName);

        $model = $this->crude->store($request->all());

        return $this->successResponse([
            'model' => $model,
            'message' => $this->crude->getCrudeSetup()->trans('item_has_been_saved')
        ]);
    }
public function store ( ApiStoreRequest $ request , $ crudeName ) { $ this -> crude = CrudeInstance :: get ( $ request -> crudeName ) ; $ model = $ this -> crude -> store ( $ request -> all ( ) ) ; return $ this -> successResponse ( [ 'model' => $ model , 'message' => $ this -> crude -> getCrudeSetup ( ) -> trans ( 'item_has_been_saved' ) ] ) ; }
Add new model
Add new model