Looking to hire Laravel developers? Try LaraJobs

laravel-fe-integrator maintained by thainph

Description
Generate configs, enums, routes in FE for Laravel
Author
Last update
2026/03/18 12:35 (v3.x-dev)
License
Links
Downloads
262

Comments
comments powered by Disqus

Laravel FE Integrator

Generate enums, routes, config from BE to FE for Laravel.

Installation

  1. Config in app.php Thainph\LaravelFeIntegrator\class LaravelFeIntegratorServiceProvider extends ServiceProvider,
  2. Publish config file: php artisan vendor:publish --tag=laravel-fe-integrator

How to use

  1. Generate enums:
  • Run below command to generate enums to typescript enum:
    php artisan lfi:generate-enum {path-to-directory} --format={ts}
    
  1. Generate routes:
  • Run below command to generate all routes to js or json:
    php artisan lfi:generate-route {path-to-directory} --format={js|json}
    
  • Using with Ziggy:
    import route from "ziggy";
    import { Ziggy } from "{path-to-your-file}";
    
    Vue.mixin({
        methods: {
            route: (name, params, absolute) => route(name, params, absolute, Ziggy),
        }
    });
    
    
    
  1. Generate config:
  • Run below command to generate config to typescript enum:
    php artisan lfi:generate-config {path-to-directory} --format={ts}