File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ protected function cookies()
243
243
244
244
// All of the cookies for the response are actually stored on the
245
245
// Cookie class until we're ready to send the response back to
246
- // the browser. This allows a cookies to be set easily.
246
+ // the browser. This allows our cookies to be set easily.
247
247
foreach (Cookie::$ jar as $ name => $ cookie )
248
248
{
249
249
$ config = array_values ($ cookie );
@@ -277,16 +277,23 @@ public function headers()
277
277
}
278
278
279
279
/**
280
- * Set the response status code.
280
+ * Get / set the response status code.
281
281
*
282
- * @param int $status
283
- * @return Response
282
+ * @param int $status
283
+ * @return mixed
284
284
*/
285
- public function status ($ status )
285
+ public function status ($ status = null )
286
286
{
287
- $ this ->foundation ->setStatusCode ($ status );
287
+ if (is_null ($ status ))
288
+ {
289
+ return $ this ->foundation ->getStatusCode ();
290
+ }
291
+ else
292
+ {
293
+ $ this ->foundation ->setStatusCode ($ status );
288
294
289
- return $ this ;
295
+ return $ this ;
296
+ }
290
297
}
291
298
292
299
}
You can’t perform that action at this time.
0 commit comments