boshurik/admin-bundle
Symfony admin bundle inspired by standard CRUD generators. Install via Composer, register the bundle, and mount routes under /admin. Includes frontend build workflow (npm/bower/gulp); administrator entity and security setup are TBD.
Since this is a Symfony-only bundle, direct integration into Laravel is not feasible. However, if you still want to explore its core functionality for inspiration or partial use, follow these theoretical steps:
Understand the Core Concept
User, Product).Equivalent Laravel Alternatives
composer require filament/filament:"^3.0"
composer require backpack/crud
Quick Laravel CRUD Example (Manual) If you want to replicate the bundle’s functionality in Laravel:
php artisan make:controller Admin/UserController --resource
Define routes in routes/web.php:
Route::resource('admin/users', \App\Http\Controllers\Admin\UserController::class);
Use Laravel’s built-in Form Requests for validation:
php artisan make:request StoreUserRequest
Where to Look First
Entity Setup
User):
// src/Entity/User.php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class User { ... }
Routing
routing.yml:
BoShurikAdminBundle:
resource: "@BoShurikAdminBundle/Resources/config/routing.yml"
prefix: /admin
Route::prefix('admin')->group(function () {
Route::resource('users', UserController::class);
});
Form Types
FormType classes (e.g., UserType):
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class UserType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options) {
$builder->add('name')->add('email');
}
}
Filters
FormType or query builders.Security
security.yml:
access_control:
- { path: ^/admin, roles: ROLE_ADMIN }
Route::middleware(['auth', 'admin'])->group(function () { ... });
composer require laravel/livewire
Example:
// app/Http/Livewire/Admin/UserManager.php
public function render() {
return view('livewire.admin.user-manager', [
'users' => User::all(),
]);
}
No Laravel Support
BoShurikAdminBundle in Laravel’s AppServiceProvider will fail with:
Class 'BoShurik\AdminBundle\BoShurikAdminBundle' not found in Laravel's autoloader.
Documentation Gaps
TBD for critical steps (e.g., entity setup, security).Dependency Conflicts
doctrine/orm (vs. Laravel’s Eloquent).symfony/form (vs. Laravel’s Form component).UI Limitations
Security Risks
spatie/laravel-audit-logs), or Nova’s built-in features.Symfony-Specific Errors
Cannot autowire service "BoShurik\AdminBundle\Service\AdminService": No such file or directory.
composer.json for missing dependencies.Laravel Workarounds
// Laravel: Filter users by role
$users = User::where('role', 'admin')->get();
Repository or FormType filter.Performance Quirks
with() or load() in Eloquent:
User::with('posts')->get();
Customizing the Bundle (Symfony)
templates/BoShurikAdminBundle/ (Symfony convention).FormType classes to add fields.Laravel Equivalents
Filament\Resources\UserResource::class,
CRUD::addFields([...]);
Adding Features
admin.pre_save).How can I help you explore Laravel packages today?