Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Materials Category

Materials Category Laravel Package

baks-dev/materials-category

Laravel/PHP модуль «Materials Category» для каталога сырья: управление категориями и структурами материалов, интеграция с baks-dev/materials-catalog. Установка через Composer, тесты PHPUnit (group=materials-category). PHP 8.4+. MIT лицензия.

View on GitHub
Deep Wiki
Context7

composer require materials-category

Frequently asked questions about Materials Category
Can I use this package for a B2B procurement platform with complex material hierarchies?
Yes, this package is specifically designed for material categorization with nested hierarchies, metadata (like unit weights), and bulk operations—ideal for B2B procurement or manufacturing platforms where material classification is critical.
How do I install baks-dev/materials-category in a Laravel 10+ project?
Run `composer require baks-dev/materials-category baks-dev/materials-catalog` in your project directory. Ensure your project uses PHP 8.4+ and Laravel 10+ for compatibility.
Does this package support Laravel’s Eloquent ORM or is it Doctrine-only?
The package uses Doctrine entities, but you’ll need to manually translate them to Eloquent models (e.g., `Category` entity → `Category` model with `HasFactory`, `SoftDeletes`). The README doesn’t provide migration scripts, so you’ll need to adapt Doctrine schemas to Laravel’s `Schema` builder.
Will this work with Laravel’s built-in validation system?
No, the package relies on Symfony’s `Validator`. You’ll need to create a service provider bridge to replace it with Laravel’s `Validator` facade or manually integrate Symfony’s validation logic into your Laravel application.
Can I use this package without baks-dev/core or materials-catalog?
The package is tightly coupled with `baks-dev/core` (v7.4+) and `materials-catalog`. While core functionality may work independently, some features (e.g., auditing, RBAC) might fail. Assess whether you can decouple dependencies or use alternatives like `spatie/laravel-activitylog`.
Are there any known issues with nested category hierarchies or bulk operations?
The package supports nested hierarchies and bulk operations, but undocumented edge cases (e.g., circular references, concurrent writes) may exist. Run black-box tests or extend the existing PHPUnit tests (group `materials-category`) to validate stability.
How do I integrate this with Laravel’s event system?
Symfony events (e.g., `CategoryCreatedEvent`) must be manually bridged to Laravel’s event system. Create a listener wrapper (e.g., `SymfonyEventListener`) to dispatch Laravel events (e.g., `CategoryCreated`) when Symfony events are triggered.
Does this package include API routes or a CLI tool for managing categories?
No, the package is backend-focused. You’ll need to build custom API routes (e.g., `Route::apiResource('categories', CategoryController::class)`) or integrate with admin panels like Filament, Nova, or Livewire for UI management.
What Laravel versions and PHP versions are officially supported?
The package requires **PHP 8.4+** and is designed for Laravel 10+. For older Laravel versions (e.g., 9.x), you’ll need to manually audit compatibility, especially for Symfony-Laravel abstractions like the Container or Validator.
Are there alternatives to this package for material categorization in Laravel?
If you need a Laravel-native solution, consider `spatie/laravel-permission` for RBAC or `spatie/laravel-activitylog` for auditing, but neither handles material-specific hierarchies. For pure categorization, you might build a custom Eloquent solution or fork this package to remove Symfony dependencies.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky