Skip to content

Commit

Permalink
Update HydeValetDriver.php
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva authored Sep 13, 2024
1 parent 5902f2d commit 611f199
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions resources/stubs/HydeValetDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
use Composer\InstalledVersions;
use Valet\Drivers\BasicValetDriver;

function dd(...$args)
{
echo '<pre>';
foreach ($args as $x) {
var_dump($x);
}
die(1);
}

class HydeValetDriver extends BasicValetDriver
{
/**
Expand All @@ -15,16 +24,20 @@ public function serves(string $sitePath, string $siteName, string $uri): bool
return file_exists($sitePath.'/hyde');
}

/**
* Take any steps necessary before loading the front controller for this driver.
*/
public function beforeLoading(string $sitePath, string $siteName, string $uri): void
{
//
}

/**
* Determine if the incoming request is for a static file.
*/
public function isStaticFile(string $sitePath, string $siteName, string $uri)/*: string|false */
{
if (file_exists($staticFilePath = $sitePath.'/_site'.$uri)) {
return $staticFilePath;
}

return false;
return false; // Handled by the realtime compiler
}

/**
Expand Down

0 comments on commit 611f199

Please sign in to comment.