PHPackages                             norman-huth/muetze-site - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. norman-huth/muetze-site

AbandonedArchivedLaravel-package[Localization &amp; i18n](/categories/localization)

norman-huth/muetze-site
=======================

Always used Laravel resources

1.0.1(4y ago)353MITPHPPHP ^7.4|^8.0

Since Jun 5Pushed 4y agoCompare

[ Source](https://github.com/Muetze42/muetze-site)[ Packagist](https://packagist.org/packages/norman-huth/muetze-site)[ RSS](/packages/norman-huth-muetze-site/feed)WikiDiscussions main Synced yesterday

READMEChangelog (8)Dependencies (2)Versions (10)Used By (0)

Laravel Package
===============

[](#laravel-package)

This package includes what I often miss in Laravel and newer stubs.

Install
-------

[](#install)

```
composer require norman-huth/muetze-site
```

---

Usage
-----

[](#usage)

### Commands

[](#commands)

#### Create Pivot Table

[](#create-pivot-table)

This command creates a migration for a many-to-many relationship between 2 models.
The 2 models of the relationship must be specified in the command.

```
php artisan make:migration:pivot User Role
```

Option if one or both primary column names are not `id`

```
php artisan make:migration:pivot User Role --id1=uui --id2=foo_bar
```

#### make:bundle Command

[](#makebundle-command)

Create a model with a migration and policy
(The default can be adjusted in config.)

```
php artisan make:bundle Foo
```

Create with options to create resources disabled by config anyway.

```
// {--n : create with nova resource}
// {--m : create with migration}
// {--p : create with policy}
// {--r : create with resource}
// {--c : create with controller}
// {--a : create with api controller}
php artisan make:bundle Foo --n --m --p --r
```

##### Change the default details of the make:bundle command

[](#change-the-default-details-of-the-makebundle-command)

```
php artisan vendor:publish --provider="NormanHuth\Muetze\SiteServiceProvider" --tag="config"
```

Default:

```
    'make-bundle' => [
        'nova-resource' => false,
        'migration'      => true,
        'policy'         => true,
        'resource'       => true,
        'controller'     => false,
        'api-controller' => false,

        'namespaces' => [
            'controller'     => 'Web/',
            'api-controller' => 'Api/',
        ],
    ],
```

---

---

### Traits

[](#traits)

#### Encrypt Attributes

[](#encrypt-attributes)

The attributes always stored encrypted in the database, but output decrypted.
For these attributes simply create a column text (nullable) and specify in the array encrypts.

```
