PHPackages                             narcisonunez/laravel-scripts - 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. narcisonunez/laravel-scripts

ActiveLibrary

narcisonunez/laravel-scripts
============================

Create scripts

1.0.1(5y ago)981MITPHPPHP ^8.0

Since Mar 16Pushed 5y ago2 watchersCompare

[ Source](https://github.com/narcisonunez/laravel-scripts)[ Packagist](https://packagist.org/packages/narcisonunez/laravel-scripts)[ Docs](https://github.com/narcisonunez/laravel-scripts)[ RSS](/packages/narcisonunez-laravel-scripts/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Create scripts
==============

[](#create-scripts)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6b192efd1e08989078af414471c01beff6d5cae5f84ed0cc2a6bddb2ac4f8987/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e61726369736f6e756e657a2f6c61726176656c2d736372697074732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/narcisonunez/laravel-scripts)[![GitHub Tests Action Status](https://camo.githubusercontent.com/399768bea3b58a50b41a50cf2b5d82feb7f791fb67cc337ae127685dd370c317/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e61726369736f6e756e657a2f6c61726176656c2d736372697074732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/narcisonunez/laravel-scripts/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7b407818f1664cf75eca6d6378bc19ae051c77434544f511222f63f2ed5d5a88/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e61726369736f6e756e657a2f6c61726176656c2d736372697074732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/narcisonunez/laravel-scripts/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/cbbfa11c2a176fe78e82eb9a1d0ac73667b36ba327f55c6b42a1c7ebcc2b71d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e61726369736f6e756e657a2f6c61726176656c2d736372697074732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/narcisonunez/laravel-scripts)

[![Banner image](https://camo.githubusercontent.com/862fc55bb592e7f8196803e0ee982b570a40219a13fdf0cd080d96d47366b35f/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230536372697074732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6e61726369736f6e756e657a2532466c61726176656c2d73637269707473267061747465726e3d746f706f677261706879267374796c653d7374796c655f32266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/862fc55bb592e7f8196803e0ee982b570a40219a13fdf0cd080d96d47366b35f/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230536372697074732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6e61726369736f6e756e657a2532466c61726176656c2d73637269707473267061747465726e3d746f706f677261706879267374796c653d7374796c655f32266465736372697074696f6e3d266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

Laravel Scripts allows you to create scripts and manage if that script can run or not.

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

[](#installation)

You can install the package via composer:

```
composer require narcisonunez/laravel-scripts
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Narcisonunez\LaravelScripts\LaravelScriptsServiceProvider" --tag="scripts-migrations"
php artisan migrate
```

Terminal Usage
--------------

[](#terminal-usage)

\###Create a script Use the `--force` option to override the existing class

```
php artisan scripts:make ScriptName
```

\###Features You can customize the script by overriding the following properties:

- Numbers of times you can run the script.

```
/**
 * @var int
 */
public int $allowedRuns = 1;
```

This will ensure you are only running a script one time. By default, It is unlimited (`0`)

- Run the script inside a transaction.

```
/**
 * @var bool
 */
public bool $runAsTransaction = true;
```

This will eun you run method inside a transaction. By default, It is `false`.

- Numbers of times you can run the script.

```
/**
* @var array
*/
public array $dependenciesValues = [
    'email : The email for the notification',
    'name? : Name of the person running the script',
    'role?'
];
```

The format for the dependencies is: `fieldName : Description`. Using `?` in the `fieldName` will make it optional

You can access this values in your script class using `$this->dependencies->fieldName`

\###Run a script

```
php artisan scripts:run ScriptName
```

Use the `--interactive` option to use your `depencenciesValues`. This will ask you to enter all the values dynamically.

You can access this values in your script class using `$this->dependencies->fieldName`

\###See history

```
php artisan scripts:history [--limit=30] [--script=ScriptName]
```

By default `--limit` is set to `10`

UI Usage
--------

[](#ui-usage)

Add this line to the routes/web.php file

```
Route::laravelScripts('scripts');
```

Go to your browser `/scripts` to access the Administration.

- You are not able to create scripts from the UI.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Narciso Nunez](https://github.com/narcisonunez)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~11 days

Total

2

Last Release

1868d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b67e8932f96109abfa1fcf6d15ebe319c3d0e0551be5c59d26d7e6df0d20b07?d=identicon)[narcisonunez](/maintainers/narcisonunez)

---

Top Contributors

[![narcisonunez](https://avatars.githubusercontent.com/u/6155516?v=4)](https://github.com/narcisonunez "narcisonunez (121 commits)")

---

Tags

narcisonunezlaravel-scripts

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/narcisonunez-laravel-scripts/health.svg)

```
[![Health](https://phpackages.com/badges/narcisonunez-laravel-scripts/health.svg)](https://phpackages.com/packages/narcisonunez-laravel-scripts)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)

PHPackages © 2026

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