Skip to content
JavaabuPublic

About

WordPress classic-style widgets: widgets define their settings with stencil and how they render; developers define widget locations; Blade and Inertia React; optional translatable

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Widgets

Tests codecov Latest Version on Packagist License: MIT

WordPress classic-style widgets for Laravel. A widget is a class: its settings are a javaabu/stencil form and it renders with a Blade view and a React component. Developers define where widgets go (sidebars, footers); admins add, order, configure and remove them.

  • Widget locations rendered with <x-widgets::location name="sidebar" /> or <WidgetLocation widgets={…} />.
  • Built-in Text, Image and Link widgets, with the same markup in Blade and React.
  • Admin pages from Route::widgets(), in Blade or Inertia React, with keyboard-accessible drag and drop.
  • A policy and permissions through javaabu/permissions, for any guard and user model.
  • Dhivehi and RTL; translatable settings with javaabu/translatable.
use Javaabu\Widgets\Facades\Widgets;

// AppServiceProvider::boot()
Widgets::register(RecentPostsWidget::class);
Widgets::location('sidebar', fn () => __('Sidebar'))->max(6);

// routes/web.php
Route::widgets(['guard' => 'web_admin', 'prefix' => 'admin/widgets', 'name' => 'admin.widgets']);
<x-widgets::location name="sidebar" />

Documentation

See the docs, or llms.txt for AI assistants.

License

The MIT License (MIT). See License File.

About

WordPress classic-style widgets: widgets define their settings with stencil and how they render; developers define widget locations; Blade and Inertia React; optional translatable

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages