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 2
2
3
3
namespace FiveamCode \LaravelNotionApi \Endpoints ;
4
4
5
+ use FiveamCode \LaravelNotionApi \Entities \Collections \EntityCollection ;
6
+ use FiveamCode \LaravelNotionApi \Entities \Collections \PageCollection ;
5
7
use FiveamCode \LaravelNotionApi \Entities \Page ;
6
8
use FiveamCode \LaravelNotionApi \Exceptions \NotionException ;
7
9
use FiveamCode \LaravelNotionApi \Exceptions \HandlingException ;
10
+ use FiveamCode \LaravelNotionApi \Notion ;
8
11
9
12
/**
10
13
* Class Pages
@@ -58,7 +61,7 @@ public function createInDatabase(string $parentId, Page $page): Page
58
61
return new Page ($ response );
59
62
}
60
63
61
- /**
64
+ /**
62
65
* @return Page
63
66
*/
64
67
public function createInPage (string $ parentId , Page $ page ): Page
@@ -84,7 +87,17 @@ public function createInPage(string $parentId, Page $page): Page
84
87
return new Page ($ response );
85
88
}
86
89
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
+ }
88
101
89
102
/**
90
103
* @return array
You can’t perform that action at this time.
0 commit comments