Installation:
composer require happytodev/typhoon
php artisan typhoon:install
This publishes the migration (though Typhoon uses Orbit, not a traditional DB) and sets up the base configuration.
First Use Case: Create a content type (e.g., a blog post) via TALL stack (Tailwind, Alpine.js, Laravel, Livewire):
php artisan typhoon:make:content-type Post
This generates:
PostManager) for managing entries.resources/views/typhoon/posts/index.blade.php).config/typhoon.php) with default settings.Where to Look First:
config/typhoon.php for Orbit storage paths (e.g., storage/orbit).app/Http/Livewire/Typhoon/.resources/views/typhoon/.Content Type Management:
php artisan typhoon:make:content-type.config/orbit.php or via the TyphoonServiceProvider.Post:
# config/orbit/posts.yaml
title: string
body: markdown
published_at: datetime
Livewire Integration:
Typhoon\Livewire\ContentManager to add custom logic:
// app/Http/Livewire/Typhoon/Posts/PostManager.php
public function mount()
{
$this->contentType = 'posts';
$this->fields = ['title', 'body', 'published_at'];
}
Displaying Content:
Orbit::get():
$posts = Orbit::get('posts')->sortBy('published_at', 'desc');
@foreach($posts as $post)
<h2>{{ $post->title }}</h2>
{!! $post->body->render() !!} <!-- For markdown -->
@endforeach
TALL Stack Synergy:
bg-gray-100).<div x-data="{ editing: false }">
<button @click="editing = !editing">Edit</button>
<div x-show="editing">
@livewire('typhoon.posts.post-manager')
</div>
</div>
filament-navigation to add Typhoon links to Filament admin panels:
// app/Providers/Filament/AdminPanelProvider.php
public function panel(Panel $panel): Panel
{
return $panel
->navigationGroups([
'Content' => ['resources/views/typhoon/posts/index.blade.php'],
]);
}
config/orbit.php (e.g., S3):
'storage' => [
'default' => 's3',
'disks' => [
's3' => [
'driver' => 's3',
'bucket' => 'your-bucket',
],
],
],
Orbit\Events\ContentSaved) for post-processing:
// app/Providers/EventServiceProvider.php
public function boot()
{
Orbit::listen('posts.*', function ($event) {
// Trigger webhooks, analytics, etc.
});
}
Orbit Schema Mismatches:
php artisan orbit:migrate
php artisan orbit:dump to inspect current schemas.Livewire Caching:
php artisan view:clear
php artisan cache:clear
Markdown Rendering:
parsedown/parsedown is installed for markdown support:
composer require parsedown/parsedown
michelf/php-markdown.Filament Conflicts:
PostResource vs. PostsManager).Orbit Logs: Enable Orbit logging in config/orbit.php:
'logging' => true,
Check storage/logs/typhoon.log for schema/operation errors.
Livewire Debugging:
dd($this->content) in Livewire components to inspect data.x-data syntax).Custom Field Types:
php artisan vendor:publish --tag=orbit-fields
app/Orbit/Fields/CustomField.php.Orbit Events:
app/Providers/EventServiceProvider.php:
Orbit::listen('posts.created', function ($content) {
// Send notification, etc.
});
API Endpoints:
// routes/api.php
Route::get('/posts', function () {
return Orbit::get('posts');
});
Orbit::find() for single entries.Multi-Tenant Support:
Orbit::useStorage('tenant_' . auth()->id());
How can I help you explore Laravel packages today?