Download the PHP package ronanflavio/laradocs-generate without Composer

On this page you can find all versions of the php package ronanflavio/laradocs-generate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laradocs-generate

Live preview

Click here to check the output result.

Installation

PHP 7.2 and Laravel 6.x or higher are required.

After updating composer, add the service provider to the providers array in config/app.php

Generating docs

To generate docs simply run the command:

This command will create the routes.json file into your resource folder. The file will be used to provide data to render the view. You may want to ignore the routes.json file into your .gitignore.

Access your app host with /docs URI to see the docs page:

E.g.: http://127.0.0.1:8000/docs

Writing docs

Tha main goal of this package is to indicate which specifically is the URI parameters, the request body parameters and what is coming within the response.

To achieve this, you may want to write some custom PHPDocs above your controller class, actions and your DTOs' properties. Let's see some practical examples:

Typing the request and response objects

To indicate which is the URI parameter type, use the default @param annotation.

To indicate which class object must be given within the request, you must write the full qualified name of it's class within the @request annotation.

To indicate which class object will be returned, you must write the full qualified name of it's class within the @response annotation. If there is no class object to be returned, just type the the variable type (e.g.: boolean, int etc...) instead. void will be provided if there is no @response.

Typing the DTOs' attributes specifications

To indicate which is the variable type from an attribute you may use the standard @var annotation. If you want to be more specific, you can also indicate a practical example to that attribute using the @example annotation. See some code bellow:

Publishing

Publish the config file by running:

This will create the docs.php file in your config directory.

You can also publish the view blade file by running:

This will create the docs.blade.php file in your resource/views directory.

License

The Laradocs Generate is free software licensed under the MIT license.


All versions of laradocs-generate with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ronanflavio/laradocs-generate contains the following files

Loading the files please wait ....