PHPackages                             opanegro/nova-custom-controller - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. opanegro/nova-custom-controller

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

opanegro/nova-custom-controller
===============================

Make custom controller in Laravel Nova

1.5(6y ago)144.4k1[1 issues](https://github.com/opanegro/nova-custom-controller/issues)MITPHPPHP &gt;=7.1.0

Since Oct 25Pushed 6y ago3 watchersCompare

[ Source](https://github.com/opanegro/nova-custom-controller)[ Packagist](https://packagist.org/packages/opanegro/nova-custom-controller)[ RSS](/packages/opanegro-nova-custom-controller/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)DependenciesVersions (7)Used By (0)

Laravel Nova Custom Controller
==============================

[](#laravel-nova-custom-controller)

[![GitHub issues](https://camo.githubusercontent.com/2cbb7d692479a86a82df08b13567be0d0381a1efd6257f21852d4c89e449295b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f70616e6567726f2f6e6f76612d637573746f6d2d636f6e74726f6c6c6572)](https://github.com/opanegro/nova-custom-controller/issues)[![GitHub forks](https://camo.githubusercontent.com/4a22f85f067789a1f14ed5c6ef472ded2c56b1ee08bc814a3724cb50182dadcd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6f70616e6567726f2f6e6f76612d637573746f6d2d636f6e74726f6c6c6572)](https://github.com/opanegro/nova-custom-controller/network)[![GitHub stars](https://camo.githubusercontent.com/4243f05c64f7a65a2a9fec7a1ea93dc3486df88a9a34f68459d4c7724d75590e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f70616e6567726f2f6e6f76612d637573746f6d2d636f6e74726f6c6c6572)](https://github.com/opanegro/nova-custom-controller/stargazers)[![GitHub license](https://camo.githubusercontent.com/ca5bbdf8bce3a6ce4d54c2238164c3711b192c8c36507b296ec78ad906db5216/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f70616e6567726f2f6e6f76612d637573746f6d2d636f6e74726f6c6c6572)](https://github.com/opanegro/nova-custom-controller/blob/master/LICENSE)

**Package Nova Custom Controller** berfungsi untuk mengolah request tanpa perlu membuat controller baru, karna fitur ini sudah otomatis meng-override controller pada Laravel Nova anda.

### Required:

[](#required)

1. PHP Version &gt;= 7.1
2. Laravel &gt;= 5.8
3. Laravel Nova &gt;= 2.0

### Cara Install:

[](#cara-install)

1. Kemudian jalankan command:

```
composer require opanegro/nova-custom-controller

```

2. Selesai

### Cara Penggunaan:

[](#cara-penggunaan)

1. Daftarkan `trait` di file `app/Nova/Resource.php`

```
...
use Opanegro\NovaCustomController\Traits\NovaCustomEvents;

abstract class Resource extends NovaResource
{
    use NovaCustomEvents;

    ...
}
```

2. Tambahkan method yang anda butuhkan di resources, contoh pada resource `app/Nova/User.php`

```
class User extends Resource
{
    ...

    /**
     * Before updated in controller
     *
     * @param \Illuminate\Http\Request $request
     * @param \Illuminate\Database\Eloquent\Model $model
     */
    public static function beforeUpdated(Request $request, Model $model)
    {
        // your codes
    }
}
```

#### Create Controller with command

[](#create-controller-with-command)

`php artisan nova:custom-controller User --event=store --custom-uri-key=users`

- `User`: is the name of resource
- `--event`: is event if you want, available `store`, `update`
- `--custom-uri-key`: if you set the resource with custom uri key

#### Daftar method yang bisa digunakan:

[](#daftar-method-yang-bisa-digunakan)

Method NameTypeReturnDescription`beforeCreated()``static function`Proses sebelum melakukan penyimpanan data baru`afterCreated()``static function`Proses setelah melakukan penyimpanan data baru`beforeUpdated()``static function`Proses sebelum melakukan penyimpanan data lama`afterUpdated()``static function`Proses setelah melakukan penyimpanan data lama`afterSave()``static function`Proses setelah melakukan penyimpanan data baru &amp; lama`beforeSave()``static function`Proses sebelum melakukan penyimpanan data baru &amp; lama`customStoreController()``static function`Custom full store process controller`customUpdateController()``static function`Custom full update process controller`$unsetCustomFields``static variable``array`Unset model jika terdapat nama custom field yang tidak tersedia di `fillable``$setCustomRequests``static variable``array`Menambah request baru untuk melakukan process pada model### Contribute:

[](#contribute)

- If you help us, translate to english
- Add your request or bug in issue

#### Terima kasih buat:

[](#terima-kasih-buat)

- DOT Mas Ardi
- DOT Mas Didik
- DOT Mas Haris
- DOT Team Projek
- DOT Rangers

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

6

Last Release

2329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/04a1c1638653654619fc895aa1e7ae0a3189a9df05cf475e77cd516330d80e94?d=identicon)[opanegro](/maintainers/opanegro)

---

Top Contributors

[![ahmadrio](https://avatars.githubusercontent.com/u/41967704?v=4)](https://github.com/ahmadrio "ahmadrio (32 commits)")

---

Tags

hacktoberfestlaravel-frameworklaravel-novanova-controllerlaravelcontrollernovacustom

### Embed Badge

![Health badge](/badges/opanegro-nova-custom-controller/health.svg)

```
[![Health](https://phpackages.com/badges/opanegro-nova-custom-controller/health.svg)](https://phpackages.com/packages/opanegro-nova-custom-controller)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/custom-relationship-field

Emulate HasMany relationship without having a real relationship set between resources

33200.0k](/packages/digital-creative-custom-relationship-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
