PHPackages                             timehunter/laravel-file-generator - 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. timehunter/laravel-file-generator

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

timehunter/laravel-file-generator
=================================

A Laravel File Generator to automate creation of interface, trait and class files.

1.8.0(7y ago)195MITPHPPHP &gt;=7.0

Since Dec 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/RyanDaDeng/laravel-file-generator)[ Packagist](https://packagist.org/packages/timehunter/laravel-file-generator)[ Docs](https://github.com/timehunter/laravel-file-generator)[ RSS](/packages/timehunter-laravel-file-generator/feed)WikiDiscussions master Synced today

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

Laravel File Generator
======================

[](#laravel-file-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2827b4d2ce8f83efb3305f6f60df007b6496cb32be1f49df94e10ccb2ead606b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74696d6568756e7465722f6c61726176656c2d66696c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/timehunter/laravel-file-generator)[![Total Downloads](https://camo.githubusercontent.com/05f3c1e54e2f9eeabadd8c49e4a3a6893c3d6b9af3fd73409c6e14278fccc2f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74696d6568756e7465722f6c61726176656c2d66696c652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/timehunter/laravel-file-generator)

A Laravel File Generator which allows you to:

1. quickly generate trait, class and interface
2. automate the creation of repeated php files
3. help you generate code base structure (modular,pattern etc.)

The main logic is using Blade template engine to populate the files. Feel free to look into the source code.

Preview Demo
------------

[](#preview-demo)

[![](https://github.com/RyanDaDeng/design-patterns/raw/master/preview.gif)](https://github.com/RyanDaDeng/design-patterns/blob/master/preview.gif)

Generation Demo
---------------

[](#generation-demo)

[![](https://github.com/RyanDaDeng/design-patterns/raw/master/generation.gif)](https://github.com/RyanDaDeng/design-patterns/blob/master/generation.gif)

Next Release features
---------------------

[](#next-release-features)

1. will support command line generator
2. will support schema validation
3. will cover tests
4. will support webpage realtime preview

Requirement
-----------

[](#requirement)

This package requires the following dependencies:

- Laravel 5.x
- php &gt; 7 (if you need support for version below 7, please create issue ticket)

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

[](#installation)

Via Composer

```
$ composer require timehunter/laravel-file-generator "^1.8.0"
```

If your Laravel framework version &lt;= 5.4, please register the service provider in your config file: /config/app.php, otherwise please skip it.

```
'providers'=[
    ....,
    TimeHunter\LaravelFileGenerator\LaravelFileGeneratorServiceProvider::class
]
```

And also ( Laravel framework version &lt;= 5.4)

```
'aliases'=[
     ....,
      'LaravelFileGenerator' => TimeHunter\LaravelFileGenerator\Facades\LaravelFileGenerator::class
 ]
```

Usage
-----

[](#usage)

#### Step 1

[](#step-1)

Create a file template in which you tell the generator what information will be appended to your file. e.g. the following is an example of Interface file template which implements InterfaceSimpleTemplateInterface:

```
