PHPackages                             sierratecnologia/pedreiro - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sierratecnologia/pedreiro

ActiveLibrary

sierratecnologia/pedreiro
=========================

:package\_description

0.4.3(4y ago)0579[8 PRs](https://github.com/SierraTecnologia/Pedreiro/pulls)9MITPHPPHP ^7.2|^8.0CI failing

Since Sep 8Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/SierraTecnologia/Pedreiro)[ Packagist](https://packagist.org/packages/sierratecnologia/pedreiro)[ Docs](https://github.com/sierratecnologia/pedreiro)[ Fund](https://ricasolucoes.com.br/open-source/support-us)[ GitHub Sponsors](https://github.com/ricasolucoes)[ RSS](/packages/sierratecnologia-pedreiro/feed)WikiDiscussions stable Synced 2d ago

READMEChangelogDependencies (36)Versions (15)Used By (9)

Pedreiro - Laravel CRUD Forms &amp; Admin Panel Framework
=========================================================

[](#pedreiro---laravel-crud-forms--admin-panel-framework)

[![Latest Version on Packagist](https://camo.githubusercontent.com/96a30c4a403f847f786766e940110e70df65c18deabf39bdb19e1b2dbf4bf0ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7369657272617465636e6f6c6f6769612f706564726569726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sierratecnologia/pedreiro)[![GitHub Tests Action Status](https://camo.githubusercontent.com/cbf78833653ab3b2d1dde0cd22639fef9a5d1ef0d3091413e402a91e6240d3f4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7369657272617465636e6f6c6f6769612f706564726569726f2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/sierratecnologia/pedreiro/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/589e715f9dedcd626a1404bf9c2af026d7a46a0b20cd102f311938674f00a110/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7369657272617465636e6f6c6f6769612f706564726569726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sierratecnologia/pedreiro)

**Pedreiro** is a comprehensive Laravel package (≥5.5) that provides a powerful CRUD (Create, Read, Update, Delete) form framework and admin panel infrastructure. It's designed as a quick, non-intrusive tool that dramatically reduces the time spent building admin interfaces while maintaining flexibility and extensibility.

Features
--------

[](#features)

- **Complete CRUD System**: Automatic generation of Create, Read, Update, Delete operations
- **20+ Form Field Types**: Text, Number, Date, Image, Select, RichText, Markdown, and many more
- **Relationship Handling**: Seamless management of BelongsTo and ManyToMany relationships
- **Data Export**: Built-in CSV and Excel export capabilities
- **AdminLTE Integration**: Professional admin theme with customizable layouts
- **DataTables Support**: Fast, searchable, sortable data tables out of the box
- **Multiple Sections**: Organize your admin panel into Painel, Master, Admin, and Rica sections
- **Validation System**: Model-level validation with automatic form error handling
- **Authorization**: Policy-based access control for secure admin operations
- **Localization**: Multi-language support with locale-specific data
- **Asset Management**: Integrated asset pipeline with minification support
- **Extensible Architecture**: Easy to customize through traits, service providers, and handlers

Requirements
------------

[](#requirements)

- PHP 7.2 or higher (PHP 8.0+ supported)
- Laravel 5.5 or higher
- Composer

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require sierratecnologia/pedreiro
```

The package will automatically register its service provider through Laravel's package discovery.

### Publish Configuration

[](#publish-configuration)

Publish the package configuration and assets:

```
# Publish configuration files
php artisan vendor:publish --provider="Pedreiro\PedreiroServiceProvider" --tag=config

# Publish views (optional, for customization)
php artisan vendor:publish --provider="Pedreiro\PedreiroServiceProvider" --tag=views

# Publish assets
php artisan vendor:publish --provider="Pedreiro\PedreiroServiceProvider" --tag=assets

# Publish language files
php artisan vendor:publish --provider="Pedreiro\PedreiroServiceProvider" --tag=lang
```

### Run Migrations

[](#run-migrations)

Run the package migrations to create necessary database tables:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

The main configuration file is located at `config/pedreiro.php`. Key options include:

```
return [
    // Base layout for admin pages
    'blade_layout' => 'layouts.app',

    // Section name for content injection
    'blade_section' => 'content',

    // Use FontAwesome icons in buttons
    'button_icons' => true,
];
```

Usage
-----

[](#usage)

### Basic CRUD Controller

[](#basic-crud-controller)

Create a controller that uses the `CrudController` trait:

```
