This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "object", | |
| "properties": { | |
| "status_code": { | |
| "type": "integer" | |
| }, | |
| "data": { | |
| "type": "object", | |
| "properties": { | |
| "id": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public static function validatorForCreation(NovaRequest $request) | |
| { | |
| return Validator::make($request->all(), static::rulesForCreation($request), [], self::$attributes) | |
| ->after(function ($validator) use ($request) { | |
| static::afterValidation($request, $validator); | |
| static::afterCreationValidation($request, $validator); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public static function validatorForUpdate(NovaRequest $request) | |
| { | |
| return Validator::make($request->all(), static::rulesForUpdate($request), [], ['code' => 'Kode Bank']) | |
| ->after(function ($validator) use ($request) { | |
| static::afterValidation($request, $validator); | |
| static::afterUpdateValidation($request, $validator); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public static function validatorForCreation(NovaRequest $request) | |
| { | |
| return Validator::make($request->all(), static::rulesForCreation($request), [], ['code' => 'Kode Bank']) | |
| ->after(function ($validator) use ($request) { | |
| static::afterValidation($request, $validator); | |
| static::afterCreationValidation($request, $validator); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // this code is in nova service provice | |
| // | |
| public function boot() | |
| { | |
| \Laravel\Nova\Fields\Field::macro('readOnly', function(){ | |
| $this->withMeta(['extraAttributes' => [ | |
| 'readonly' => true, | |
| 'disabled' => true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // this code is in nova resource | |
| public function fields(Request $request) | |
| { | |
| return [ | |
| Text::make('SomethingReadOnly')->withMeta(['extraAttributes' => [ | |
| 'readonly' => true, | |
| 'disabled' => true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var response = pm.response.json(); | |
| const paramsString = request.url.split('?')[1]; | |
| const eachParamArray = paramsString.split('&'); | |
| let params = {}; | |
| eachParamArray.forEach((param) => { | |
| const key = param.split('=')[0]; | |
| const value = param.split('=')[1]; | |
| Object.assign(params, {[key]: value}); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tests["Status code is 200"] = responseCode.code === 200; | |
| tests["Response body has attribute name"] = responseBody.has("name"); | |
| tests["Response body has attribute brand"] = responseBody.has("brand"); | |
| tests["Response body has attribute price"] = responseBody.has("price"); | |
| tests["Response body has attribute picture"] = responseBody.has("picture"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "data": [{ | |
| "name": "Argentina Authentic Jersey 2018", | |
| "brand": "Adidas", | |
| "price": "$130", | |
| "picture": "https://www.goalinn.com/f/13669/136697631/adidas-argentina-away-jersey-s-s.jpg" | |
| }, | |
| { | |
| "name": "Brazil Authentic Jersey 2018", | |
| "brand": "Nike", |
NewerOlder