PHPackages                             ajayexpert/artisan-observer-maker - 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. [CLI &amp; Console](/categories/cli)
4. /
5. ajayexpert/artisan-observer-maker

ActiveLibrary[CLI &amp; Console](/categories/cli)

ajayexpert/artisan-observer-maker
=================================

Artisan Command To Create A Observer Stub

v1.0.2(8y ago)03522MITPHPPHP &gt;=5.3.0

Since Sep 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ajayexpert/artisan-observer-maker)[ Packagist](https://packagist.org/packages/ajayexpert/artisan-observer-maker)[ Docs](https://github.com/ajayexpert/artisan-observer-maker)[ RSS](/packages/ajayexpert-artisan-observer-maker/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

ObserverMaker
=============

[](#observermaker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d03d3e71ed6f5d469fc171fa18b5cbb34ecba88bd85cf5abe4774a35d8170fdb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616a61796578706572742f6172746973616e2d6f627365727665722d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ajayexpert/artisan-observer-maker)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/7c17d0ed35f2a46012269b44f3c82f24a26112cf6e4fe31d571992a422b59b60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616a61796578706572742f6172746973616e2d6f627365727665722d6d616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ajayexpert/artisan-observer-maker/stats)

ObserverMaker creates an artisan command that lets you quickly create a observer stub.

Install
-------

[](#install)

Via Composer

```
composer require ajayexpert/artisan-observer-maker

```

In your app/config/app.php file, add the following to the providers array:

```
AjayExpert\ObserverMaker\ObserverMakerServiceProvider::class,

```

Usage
-----

[](#usage)

Once installed, you should see make:observer as one of the artisan commands when you run:

```
php artisan list

```

To use this command, supply it with two arguments, the first being the name of the observer, and the second being the name of the folder you want it to reside in. If the folder does not exist, it will be created for you.

For example:

```
php artisan make:observer TestObserver

```

This would create a directory named Observers in your app directory with a php file named TestObserver.php, which would contain the following stub:

```
