File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 1515
1616use OpenLRW \OpenLRW ;
1717use OpenLRW \Exception \InternalServerErrorException ;
18- use Symfony \Component \Debug \Exception \UndefinedFunctionException ;
1918
2019abstract class OneRoster extends Model
2120{
@@ -88,15 +87,25 @@ protected static function all()
8887 return $ results ;
8988 }
9089
91- protected static function save ($ data = null )
90+ /**
91+ * Save a model
92+ *
93+ * @return mixed|null
94+ */
95+ public function save ()
9296 {
93- if ($ data === null ) {
94- $ data = static ::toJson ();
95- }
97+ $ attributes = $ this ->attributes ;
9698 $ header = self ::generateHeader ();
97- return OpenLRW::httpPost (self ::PREFIX . static ::$ collection , $ header , $ data );
99+ return OpenLRW::httpPost (self ::PREFIX . static ::$ collection , $ this -> attributes , $ header );
98100 }
99101
102+ /**
103+ * Update a model
104+ *
105+ * @param $id
106+ * @param $data
107+ * @return mixed|null
108+ */
100109 protected static function update ($ id , $ data )
101110 {
102111 $ header = self ::generateHeader ();
You can’t perform that action at this time.
0 commit comments