PHPackages                             mahmoud-mhamed/inertia-vue-helpers - 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. mahmoud-mhamed/inertia-vue-helpers

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

mahmoud-mhamed/inertia-vue-helpers
==================================

This is my package inertia-vue-helpers

0.0.7(1y ago)01.5k—0%[3 PRs](https://github.com/mahmoud-mhamed/inertia-vue-helpers/pulls)MITPHPPHP ^8.1

Since Jan 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mahmoud-mhamed/inertia-vue-helpers)[ Packagist](https://packagist.org/packages/mahmoud-mhamed/inertia-vue-helpers)[ Docs](https://github.com/mahmoud-mhamed/inertia-vue-helpers)[ RSS](/packages/mahmoud-mhamed-inertia-vue-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (12)Versions (12)Used By (0)

This is my package inertia-vue-helpers
======================================

[](#this-is-my-package-inertia-vue-helpers)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d43eb4a296f6bf608d132cd3aa22e77117f17656b530d3ce6e5105d30dbcf2c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61686d6f75642d6d68616d65642f696e65727469612d7675652d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mahmoud-mhamed/inertia-vue-helpers)[![GitHub Tests Action Status](https://camo.githubusercontent.com/8e2f792bc329ec84fe5af9d7db77e5f077845f9fdb0a3b2400ec21a9d91ffcd0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d61686d6f75642d6d68616d65642f696e65727469612d7675652d68656c706572732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mahmoud-mhamed/inertia-vue-helpers/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/dfab12badc07d912600c9151d7d6e8d583b5c2535cbf9f3cd805ed63a51f00dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d61686d6f75642d6d68616d65642f696e65727469612d7675652d68656c706572732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mahmoud-mhamed/inertia-vue-helpers/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9fab1a92a5047a2d9d9be0d54fc1aa71650f7098f77594913738dea3c4739637/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61686d6f75642d6d68616d65642f696e65727469612d7675652d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mahmoud-mhamed/inertia-vue-helpers)

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

[](#installation)

You can install the package via composer:

```
composer require mahmoud-mhamed/inertia-vue-helpers
```

Before Use Any Command
----------------------

[](#before-use-any-command)

##### must add \\Mahmoudmhamed\\InertiaVueHelpers\\Providers\\PackageServiceProvider::class to config=&gt;app-&gt;providers array

[](#must-add-mahmoudmhamedinertiavuehelpersproviderspackageserviceproviderclass-to-configapp-providers-array)

Before Use Any Command
----------------------

[](#before-use-any-command-1)

### for laravel &lt; 11

[](#for-laravel--11)

##### must add to config -&gt; app -&gt; providers array

[](#must-add--to-config---app---providers-array)

```
  \Mahmoudmhamed\InertiaVueHelpers\Providers\PackageServiceProvider::class
```

### for laravel &gt;= 11

[](#for-laravel--11-1)

##### must add to config -&gt; app.php

[](#must-add-to-config---appphp)

```
  'providers' => ServiceProvider::defaultProviders()->merge([
        \Mahmoudmhamed\InertiaVueHelpers\Providers\PackageServiceProvider::class,
    ])->toArray()
```

to force publish any file add --force to command
------------------------------------------------

[](#to-force-publish-any-file-add---force-to-command)

Publish Command To Clone Enums From app =&gt; Enums To resources =&gt; js =&gt; enum.js:

```
php artisan vendor:publish --tag="clone-enums-to-js-command"
```

---

Publish Command To Clone Lang Folder from php To resources =&gt; js =&gt; lang:

```
php artisan vendor:publish --tag="clone-lang-to-js-command"
```

---

Publish Command To Clone Abilities from app =&gt; classes =&gt; Abilities.php To resources =&gt; js =&gt; ability.js:

```
php artisan vendor:publish --tag="copy-ability-to-js-command"
```

---

Publish Vue Ability directive

```
php artisan vendor:publish --tag="ability-directive"
```

add to app.js

import {ability\_if,ability\_else} from "@/directive/AbilityDirective";

.directive('ability', ability\_if)

.directive('else-ability', ability\_else)

### You Can Run Command From package.json by add to scripts

[](#you-can-run-command-from-packagejson-by-add-to-scripts)

```
{
    ....
    "scripts": {
        "run-all": "php artisan lang:copy && php artisan ability:clone && php artisan enums:clone-to-js",
        "copy-lang": "php artisan lang:copy",
        "copy-ability": "php artisan ability:clone",
        "copy-enum": "php artisan enums:clone-to-js",
        "dev": "vite",
        "build": "vite build"
    },
    ...
}

```

### To allow auto generate file if use vite.config.js in plugins array add

[](#to-allow-auto-generate-file-if-use-viteconfigjs-in-plugins-array-add)

```
    plugins: [
    ....
    {
        name: "enum_clone",
        enforce: "post",
        handleHotUpdate({ server, file }) {
            if (file.includes("/app/Enums")) {
                exec(
                    "php artisan enums:clone-to-js",
                    (error, stdout) =>
                        error === null &&
                        console.log(`Enum Js File Generated Successfully !`)
                );
            }
        },
    },
   {
    name: "lang",
    enforce: "post",
    handleHotUpdate({ server, file }) {
        if (file.includes("/lang/")) {
            exec(
                `php artisan lang:copy --lang=${file.includes('/ar/')?'ar':'en'} --file=${file.split('/').pop()}`,
                (error, stdout) =>
                    error === null &&
                    console.log(`Lang Generated Successfully !`)
            );
        }
    },
},
    {
        name: "ability",
        enforce: "post",
        handleHotUpdate({ server, file }) {
            if (file.includes("/Abilities.php")) {
                exec(
                    "php artisan ability:clone",
                    (error, stdout) =>
                        error === null &&
                        console.log(`Ability Clone Successfully !`)
                );
            }
        },
    },
],

```

---

### publish vue commponets to path resources/js/Components

[](#publish-vue-commponets--to-path-resourcesjscomponents)

```
php artisan vendor:publish --tag="ElTextComponent"
php artisan vendor:publish --tag="ElButtonComponent"
php artisan vendor:publish --tag="ElFormComponents"
```

Tagpublish filedescriptionElTextComponentText/ElText.vueElButtonComponentButtons/ ElPrimaryButton.vue,ElSecondaryButton.vue,ElSubmitButton.vue/ElLoadingDots.vue### publish make chart js or apex chart

[](#publish-make-chart-js-or--apex-chart)

```
npm i chart.js
npm i chartjs-plugin-datalabels

npm install --save apexcharts
npm install --save vue3-apexcharts

php artisan vendor:publish --tag="Chart"
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [mahmoud-mhamed](https://github.com/mahmoud-mhamed)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.5% 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 ~81 days

Recently: every ~12 days

Total

8

Last Release

636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d00c2f8ae29401e1b578e1435eae2629802a0c10e8322e5cb12d701538ff971?d=identicon)[mahmoud-mhamed](/maintainers/mahmoud-mhamed)

---

Top Contributors

[![mahmoud-mhamed](https://avatars.githubusercontent.com/u/45818696?v=4)](https://github.com/mahmoud-mhamed "mahmoud-mhamed (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

laravelmahmoud-mhamedinertia-vue-helpers

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mahmoud-mhamed-inertia-vue-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/mahmoud-mhamed-inertia-vue-helpers/health.svg)](https://phpackages.com/packages/mahmoud-mhamed-inertia-vue-helpers)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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