Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ php artisan make:mod Blog --web # Web routes only
php artisan make:mod Blog --api # API routes only

# Testing
vendor/bin/pest # Run all tests
composer test # Run all tests (Pest)
vendor/bin/pest tests/Feature # Run feature tests only
vendor/bin/pest --filter="test name" # Run single test by name
vendor/bin/pest path/to/TestFile.php # Run single test file

# Code quality
composer lint # Fix code style (Pint)
vendor/bin/pint --dirty # Format changed files only
vendor/bin/pint # Format all files
```

## Module Structure
Expand All @@ -82,7 +82,7 @@ app/Mod/Blog/
|---------|-----------|---------|
| `lthn/php` | `Core\` | Framework core, events, module discovery |
| `lthn/php-admin` | `Core\Admin\` | Admin panel, Livewire modals |
| `lthn/php-api` | `Core\Api\` | REST API, scopes, rate limiting, webhooks |
| `lthn/api` | `Core\Api\` | REST API, scopes, rate limiting, webhooks |
| `lthn/php-mcp` | `Core\Mcp\` | Model Context Protocol for AI agents |

## Testing
Expand Down
2 changes: 2 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
Expand Down
14 changes: 9 additions & 5 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<?php

declare(strict_types=1);

use Core\LifecycleEventProvider;
use Core\Website\Boot;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
->withProviders([
// Core PHP Framework
\Core\LifecycleEventProvider::class,
\Core\Website\Boot::class,
\Core\Front\Boot::class,
\Core\Mod\Boot::class,
LifecycleEventProvider::class,
Boot::class,
Core\Front\Boot::class,
Core\Mod\Boot::class,
])
->withRouting(
web: __DIR__.'/../routes/web.php',
Expand All @@ -19,7 +23,7 @@
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
\Core\Front\Boot::middleware($middleware);
Core\Front\Boot::middleware($middleware);
})
->withExceptions(function (Exceptions $exceptions) {
//
Expand Down
5 changes: 4 additions & 1 deletion bootstrap/providers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

declare(strict_types=1);
use App\Providers\AppServiceProvider;

return [
App\Providers\AppServiceProvider::class,
AppServiceProvider::class,
];
2 changes: 2 additions & 0 deletions config/core.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Database\Seeders;

use Illuminate\Database\Seeder;
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
level: 5
paths:
- app
excludePaths:
- vendor
- tests
8 changes: 8 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"preset": "psr12",
"rules": {
"declare_strict_types": true,
"ordered_imports": true,
"no_unused_imports": true
}
}
2 changes: 2 additions & 0 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));
Expand Down
2 changes: 2 additions & 0 deletions routes/api.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

declare(strict_types=1);

// API routes are registered via Core modules
2 changes: 2 additions & 0 deletions routes/console.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

declare(strict_types=1);

// Console commands are registered via Core modules
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Route;

Route::get('/', function () {
Expand Down
Loading