PHPackages                             ayup-creative/laravel-stub-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ayup-creative/laravel-stub-maker

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

ayup-creative/laravel-stub-maker
================================

Quickly and easily add the ability to output stubbed content from Artisan commands

0.6.1(1y ago)07101PHP

Since Nov 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Ayup-Creative/laravel-stub-maker)[ Packagist](https://packagist.org/packages/ayup-creative/laravel-stub-maker)[ RSS](/packages/ayup-creative-laravel-stub-maker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (1)

Laravel Stub Maker
==================

[](#laravel-stub-maker)

Overview
--------

[](#overview)

Laravel Stub Maker is a simple, powerful package for programmatically generating PHP class and interface stubs with an intuitive API.

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

[](#installation)

```
composer require ayup-creative/laravel-stub-maker
```

Basic Usage
-----------

[](#basic-usage)

### Creating a Stub

[](#creating-a-stub)

```
use Ayup\LaravelStubMaker\Concerns\MakesStubs;

$stub = $this->stub('MyClass')
            ->extends('\\App\\Examples\\ExampleClass');
```

Using `$stub` as a string from the above example would output the FQN of the class being created.

```
echo $stub;

// "App\MyClass"
```

Calling the `output()` method would return PHP that can then be written to a file.

```
echo $stub->output();

//
