Search by

ilbronza / warehouse

ilBronza

Laravel warehouse system

Package info

github.com/ilBronza/Warehouse

Homepage

pkg:composer/ilbronza/warehouse

Statistics

Installs: 116

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 0

v2.5.1 2026-08-07 12:29 UTC

This package is auto-updated.

Last update: 2026-10-20 09:29:02 UTC


README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require ilbronza/warehouse

Usage

Strutture e stanze

Il menu Magazzino comprende le anagrafiche Strutture, Stanze, Categorie di locali e Tipologie di locali.

Le categorie raggruppano le tipologie: entrambe sono condivise tra tutte le strutture. Ogni stanza richiede una struttura e una tipologia; la categoria si ricava dalla tipologia. Nome, codice/numero, piano, superficie in m² e note descrivono la singola stanza.

Il campo destination_id è facoltativo e collega la stanza a una Destination del pacchetto Clients. Più stanze possono condividere la stessa destinazione. La relazione inversa Destination::rooms() è registrata da Warehouse, anche per il modello Destination configurato dall'applicazione ospite.

use IlBronza\Warehouse\Models\Structure\Structure;
use IlBronza\Warehouse\Models\Room\RoomCategory;

$category = RoomCategory::getProjectClassName()::create(['name' => 'Direzionale']);
$type = $category->roomTypes()->create(['name' => 'Ufficio']);
$structure = Structure::getProjectClassName()::create(['name' => 'Sede Milano']);
$room = $structure->rooms()->create([
    'name' => 'Ufficio 01',
    'room_type_id' => $type->getKey(),
    'destination_id' => null,
]);

Eseguire php artisan migrate nell'applicazione ospite, dopo le migrazioni di Clients. Le nuove tabelle sono warehouse__structures, warehouse__room_categories, warehouse__room_types e warehouse__rooms. Classi, tabelle, controller e parametri CRUD sono personalizzabili nelle sezioni warehouse.models.structure, roomCategory, roomType e room. I nuovi valori predefiniti vengono integrati anche nelle configurazioni già pubblicate.

La cancellazione di strutture, categorie e tipologie con elementi attivi collegati viene bloccata. La cancellazione fisica di una destination azzera destination_id e conserva le stanze. La cancellazione logica della destination mantiene il riferimento nel database e la relazione restituisce null finché la destination non viene ripristinata.

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author@email.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.