Tuesday 31 July 2018

Unit Test Auto Generate for Laravel

Creating unit test for all the routes will be very difficult if you have large number of routes and parameters.

This package will automatically generate the unit test file for all of your routes and based on the form request files, to use the package install the package using composer

composer require vigneshc91/laravel-test-generator

After installing run the artisan command to generate the files

php artisan laravel-test:generate

You can use the available options to generate test file in  specific directory, or for some specific route prefix by using the options in that package

Ref : https://vigneshc91.github.io/laravel-test-generator/

Tuesday 24 July 2018

Validation Auto Generate For Laravel

Creating validation file for all the tables will be very difficult if you have large number of tables and columns.

This package will automatically generate the validation request file for all of your tables in the database, to use the package install the package using composer

composer require vigneshc91/laravel-validation-generator

After installing run the artisan command to generate the files

php artisan laravel-validation:generate

You can use the available options to generate rules for specific tables, or ignore specific tables or columns by using the options in that package

Ref : https://vigneshc91.github.io/laravel-validation-generator/

Wednesday 18 July 2018

Swagger Auto Generate For Laravel

Manually writting the swagger is always a tedious process either you write the json file or writing the swagger annotation to generate the json file

This package will automatically generate the swagger files by scanning the form request files, The package can easily be installed by running the composer in your project’s root folder.

    composer require vigneshc91/laravel-swagger

After installation to generate the swagger run the command in your terminal

    php artisan laravel-swagger:generate --filter="api" --auth="jwt" > public/docs/swagger.json

You can use several options available in that Ref: https://vigneshc91.github.io/laravel-swagger/

Tuesday 3 July 2018

Log Viewer For Laravel Projects

Viewing of log files in the laravel is always a tedious part if you run into some issues and opening the log file from the stroage folder and find for the appropriate error message

If you are experiencing that kind of problems here is a package available for that, which has great UI and easy to find log

Log Channel - Stack

  • Add rap2hpoutre/laravel-log-viewer into your composer.json file or run composer require rap2hpoutre/laravel-log-viewer
  • Add Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index');  into your route file
  • Go to http://{your-project}/logs to see your logs
  • This works also for daily log channel
  • Ref : https://github.com/rap2hpoutre/laravel-log-viewer
composer require rap2hpoutre/laravel-log-viewer

Log Channel - Daily

  • If your are using daily log channel you can use another package which has more features than the previous one
  • Add arcanedev/log-viewer into your composer.json file or run composer require arcanedev/log-viewer
  • Go to http://{your-project}/log-viewer to see your logs
  • Ref : https://github.com/ARCANEDEV/LogViewer
composer require arcanedev/log-viewer