From 2a3714ce138967676a19a3df5dafafbcad374ffd Mon Sep 17 00:00:00 2001 From: Eldon Ahrold Date: Mon, 15 Feb 2016 21:34:31 -0600 Subject: [PATCH] Add the ability to specify public api endpoints in Module's HTTP/Controllers/ApiController (Template update). --- src/Http/Controllers/ApiController.php | 7 +++++++ src/Models/Object.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/Http/Controllers/ApiController.php b/src/Http/Controllers/ApiController.php index 0fc8e7d..0e2149e 100644 --- a/src/Http/Controllers/ApiController.php +++ b/src/Http/Controllers/ApiController.php @@ -9,6 +9,13 @@ class ApiController extends BaseApiController { + + /** + * Array of endpoints that do not require authorization + * + */ + protected $publicEndpoints = []; + public function __construct(Repository $repository) { parent::__construct($repository); diff --git a/src/Models/Object.php b/src/Models/Object.php index 0d20deb..a8b919b 100644 --- a/src/Models/Object.php +++ b/src/Models/Object.php @@ -14,6 +14,13 @@ class Object extends Base use Translatable; protected $presenter = 'TypiCMS\Modules\Objects\Presenters\ModulePresenter'; + + /** + * Declare any properties that should be hidden from JSON Serialization. + * + * @var array + */ + protected $hidden = []; protected $fillable = [ 'image',