| Install | |
|---|---|
composer require mahmoud-mhamed/inertia-vue-helpers |
|
| Latest Version: | 0.0.7 |
| PHP: | ^8.1 |
You can install the package via composer:
composer require mahmoud-mhamed/inertia-vue-helpers
\Mahmoudmhamed\InertiaVueHelpers\Providers\PackageServiceProvider::class
'providers' => ServiceProvider::defaultProviders()->merge([
\Mahmoudmhamed\InertiaVueHelpers\Providers\PackageServiceProvider::class,
])->toArray()
Publish Command To Clone Enums From app => Enums To resources => js => enum.js:
php artisan vendor:publish --tag="clone-enums-to-js-command"
Publish Command To Clone Lang Folder from php To resources => js => lang:
php artisan vendor:publish --tag="clone-lang-to-js-command"
Publish Command To Clone Abilities from app => classes => Abilities.php To resources => js => 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)
{
....
"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"
},
...
}
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 !`)
);
}
},
},
],
php artisan vendor:publish --tag="ElTextComponent"
php artisan vendor:publish --tag="ElButtonComponent"
php artisan vendor:publish --tag="ElFormComponents"
| Tag | publish file | description |
|---|---|---|
| ElTextComponent | Text/ElText.vue | |
| ElButtonComponent | Buttons/ ElPrimaryButton.vue,ElSecondaryButton.vue,ElSubmitButton.vue | |
| /ElLoadingDots.vue |
npm i chart.js
npm i chartjs-plugin-datalabels
npm install --save apexcharts
npm install --save vue3-apexcharts
php artisan vendor:publish --tag="Chart"
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.