File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 22
33namespace FiveamCode \LaravelNotionApi \Endpoints ;
44
5+ use FiveamCode \LaravelNotionApi \Entities \Collections \EntityCollection ;
6+ use FiveamCode \LaravelNotionApi \Entities \Collections \PageCollection ;
57use FiveamCode \LaravelNotionApi \Entities \Page ;
68use FiveamCode \LaravelNotionApi \Exceptions \NotionException ;
79use FiveamCode \LaravelNotionApi \Exceptions \HandlingException ;
10+ use FiveamCode \LaravelNotionApi \Notion ;
811
912/**
1013 * Class Pages
@@ -58,7 +61,7 @@ public function createInDatabase(string $parentId, Page $page): Page
5861 return new Page ($ response );
5962 }
6063
61- /**
64+ /**
6265 * @return Page
6366 */
6467 public function createInPage (string $ parentId , Page $ page ): Page
@@ -84,7 +87,17 @@ public function createInPage(string $parentId, Page $page): Page
8487 return new Page ($ response );
8588 }
8689
87-
90+ /**
91+ * Return all pages possible.
92+ *
93+ * @return EntityCollection
94+ * @throws HandlingException
95+ * @throws NotionException
96+ */
97+ public function all (): EntityCollection
98+ {
99+ return $ this ->notion ->search ()->onlyPages ()->query ();
100+ }
88101
89102 /**
90103 * @return array
You can’t perform that action at this time.
0 commit comments