Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
/**
* Override Laravel's redirect helper to use relative URLs
* This ensures redirects are protocol and domain agnostic
*/
namespace App\RSpade\Core\Helpers;
/**
* Create a redirect response to the given path
* Forces relative URLs regardless of APP_URL or request protocol
*
* @param string $path
* @param int $status
* @param array $headers
* @param bool|null $secure
* @return \Illuminate\Http\RedirectResponse
*/
function rsx_redirect($path, $status = 302, $headers = [], $secure = null)
{
// Ensure path starts with /
if (!str_starts_with($path, '/')) {
$path = '/' . $path;
}
// Create a redirect response with just the path (no domain/protocol)
$response = new \Illuminate\Http\RedirectResponse($path, $status, $headers);
// Set the session on the response
if (app()->bound('session')) {
$response->setSession(app('session'));
}
return $response;
}