chore/dev-env (#6)
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1m55s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m56s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m10s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 1m56s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 2m45s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 53s

Reviewed-on: #6
Co-authored-by: Ron Rise <ron@siteworxpro.com>
Co-committed-by: Ron Rise <ron@siteworxpro.com>
This commit was merged in pull request #6.
This commit is contained in:
2025-10-16 00:24:58 +00:00
committed by Siteworx Pro Gitea
parent 78d5213892
commit d2bd9d2d1b
18 changed files with 267 additions and 21 deletions

View File

@@ -28,6 +28,14 @@ abstract class Controller implements ControllerInterface
throw new NotFoundException("not found");
}
/**
* @throws NotFoundException
*/
public function put(ServerRequest $request): ResponseInterface
{
throw new NotFoundException("not found");
}
/**
* @throws NotFoundException
*/

View File

@@ -25,6 +25,14 @@ interface ControllerInterface
*/
public function post(ServerRequest $request): ResponseInterface;
/**
* Handle the request and return a response.
*
* @param ServerRequest $request The request data.
* @return ResponseInterface The response data.
*/
public function put(ServerRequest $request): ResponseInterface;
/**
* Handle the request and return a response.
*

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Siteworxpro\App;
use Illuminate\Container\Container;
use Illuminate\Database\Capsule\Manager;
use Illuminate\Support\ServiceProvider;
use League\Route\Http\Exception\MethodNotAllowedException;
use League\Route\Http\Exception\NotFoundException;
@@ -120,18 +121,8 @@ class Server
*/
public function bootModelCapsule(): void
{
$capsule = new \Illuminate\Database\Capsule\Manager();
$capsule->addConnection([
'driver' => Config::get('db.driver'),
'host' => Config::get('db.host'),
'database' => Config::get('db.database'),
'username' => Config::get('db.username'),
'password' => Config::get('db.password'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
]);
$capsule = new Manager();
$capsule->addConnection(Config::get('db'));
$capsule->setAsGlobal();
$capsule->bootEloquent();
}

View File

@@ -278,10 +278,10 @@ class Facade
/**
* Set the application instance.
*
* @param Container $container
* @param Container | null $container
* @return void
*/
public static function setFacadeContainer(Container $container): void
public static function setFacadeContainer(Container | null $container): void
{
static::$container = $container;
}

View File

@@ -18,6 +18,7 @@ class RedisServiceProvider extends ServiceProvider
'host' => Config::get('redis.host'),
'port' => Config::get('redis.port'),
'database' => Config::get('redis.database'),
'password' => Config::get('redis.password'),
]);
});
}