Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4115

How do you set a scenario when doing a restful call in Yii2 to return certain fields

$
0
0

Im currently making a Yii2 RESTful system with AngularJs.

In my database i've got several columns that i want to be able to return when doing a particular call from a certain point in my system.

The problem i'm having is how do i return only a handful of fields eg(id, title and stub) from the restful call in another part of my system so that it ignores other fields in the table.

I would ideally like it to work in a similar way to how a Models rules work with scenarios in yii.


Viewing all articles
Browse latest Browse all 4115

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>