2017 © Pedro Peláez
 

library tswink

Generate typescript classes from Laravel models.

image

pangpondpon/tswink

Generate typescript classes from Laravel models.

  • Thursday, October 26, 2017
  • by pangpondpon
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

TS Wink

Generate typescript classes from Laravel models., (*1)

Installation

Run composer require pangpondpon/tswink and composer require doctrine/dbal, (*2)

Note: doctrine/dbal is needed for read table structure to create typescript class files., (*3)

If you're using Laravel 5.4 or below, add this to providers array inside config/app.php, (*4)

TsWink\TswinkServiceProvider::class,

Publish the config using php artisan vendor:publish and select TsWink\TswinkServiceProvider., (*5)

Change the config to suite your project, (*6)

<?php

return [
    // Destination of typescript classes
    'ts_classes_destination' => 'resources/assets/src/models',
];

Usage

Run this artisan command, (*7)

php artisan tswink:generate

The file will be in your selected directory in config file., (*8)

Result Example, (*9)

The Versions

26/10 2017

dev-master

9999999-dev

Generate typescript classes from Laravel models.

  Sources   Download

MIT

The Requires