File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public static function find(string $routeKey): ?Route
3535 }
3636
3737 /** @throws \Hyde\Framework\Exceptions\RouteNotFoundException */
38- public static function getOrFail (string $ routeKey ): Route
38+ public static function get (string $ routeKey ): Route
3939 {
4040 return static ::getFacadeRoot ()->getRoute ($ routeKey );
4141 }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function testGetOrFailThrowsExceptionIfRouteIsNotFound()
2929 {
3030 $ this ->expectException (RouteNotFoundException::class);
3131
32- Routes::getOrFail ('not-found ' );
32+ Routes::get ('not-found ' );
3333 }
3434
3535 public function testGetReturnsRouteFromRouterIndex ()
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ protected function openInExplorer(): void
296296 protected function openPageInEditor (): void
297297 {
298298 $ routeKey = $ this ->request ->data ['routeKey ' ] ?? $ this ->abort (400 , 'Must provide routeKey ' );
299- $ page = Routes::getOrFail ($ routeKey )->getPage ();
299+ $ page = Routes::get ($ routeKey )->getPage ();
300300
301301 $ binary = $ this ->findGeneralOpenBinary ();
302302 $ path = Hyde::path ($ page ->getSourcePath ());
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public static function handle(Request $request): Response
8282 protected function getPageFromRoute (): HydePage
8383 {
8484 try {
85- return Routes::getOrFail ($ this ->normalizePath ($ this ->request ->path ))->getPage ();
85+ return Routes::get ($ this ->normalizePath ($ this ->request ->path ))->getPage ();
8686 } catch (RouteNotFoundException $ exception ) {
8787 $ index = Routes::find ($ this ->normalizePath ($ this ->request ->path ).'/index ' );
8888
You can’t perform that action at this time.
0 commit comments