avris/esse positions itself as a lightweight, modular CMS, which aligns well with Laravel’s ecosystem (e.g., Eloquent ORM, Blade templating, and service container). Its focus on "essential" features suggests it could replace or augment existing CMS solutions (e.g., Spatie Media Library, Backpack CMS) for projects requiring minimalism or customization.Auth::user()), but role-based permissions (e.g., for content editors) may require custom middleware or policy extensions.Resource classes).spatie/laravel-medialibrary for advanced file management.backpack/crud or filamentphp/filament for a polished admin interface.laravel/sanctum or laravel/passport for content delivery via APIs.esse’s content types/fields. Example:
posts table → esse Post content type with title, body, and published_at fields.avris/esse in a staging environment.seo_meta field to content types).esse content types.esse’s Eloquent models.esse’s schema.Schema::hasTable() checks to avoid conflicts.esse’s nested content structure).// Legacy data migration
$legacyPosts = DB::table('legacy_posts')->get();
foreach ($legacyPosts as $post) {
Content::create([
'type' => 'post',
'data' => json_encode([
'title' => $post->title,
'body' => $post->content,
]),
'user_id' => $post->author_id,
]);
}
^9.0 or ^10.0). Test for breaking changes in newer Laravel releases (e.g., Symfony components updates).^8.1 for Laravel 9+).Content model) or middleware conflicts with existing packages.avris/esse and its dependencies (composer require avris/esse).php artisan vendor:publish --provider="Avris\Esse\EsseServiceProvider").// Example: Define a "BlogPost" content type
Schema::create('content_types', function (Blueprint $table) {
$table->id();
$table->string('name'); // e.g., 'blog_post'
$table->json('schema'); // Define fields like ['title' => 'string', 'body' => 'text']
});
public function boot()
{
Esse::contentType('blog_post', [
'title' => 'string',
'body' => 'text',
'published_at' => 'datetime',
]);
}
public function run()
{
Content::create([
'type' => 'blog_post',
'data' => [
'title' => 'Hello World',
'body' => 'Welcome to our new CMS!',
],
]);
}
resources/views/posts/show.blade.php).// app/Http/Resources/PostResource.php
public function toArray($request)
{
return [
'title' => $this->title,
'body' => $this->body,
];
}
Route::get('/api/posts', [PostController::class, 'index']);
How can I help you explore Laravel packages today?