Download the PHP package timwassenburg/laravel-improved-resource-controllers without Composer

On this page you can find all versions of the php package timwassenburg/laravel-improved-resource-controllers. 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 laravel-improved-resource-controllers

Latest Version on Packagist Total Downloads License


Table of Contents

  1. Features
  2. Getting started
    • Installation
    • Publish config (optional)
    • Publish stubs (optional)
  3. Usage
    • Default resource controller
    • Default API resource controller
    • Model resource controller
    • Model API resource controller
    • Nested resource controller
    • Nested API resource controller
  4. Variables
    • General
    • With parent (--parent=Customer)
  5. More generator packages
  6. Contributing
  7. License

Features

This simple package extends the command and generates resource controllers with working resource functions out of the box to prevent you from writing the same basic controller functions over and over again. Keep in mind the improved resource controllers are only meant as a starting point. You still have to add your own routes, validation, migrations, etc.

Getting started

Installation

Require the package with composer.

Publish config (optional)

Publish stubs (optional)

To change the generated resource controllers you can override the stubs and adjust it to your liking. The stubs will be stored in /resources/stubs.

Usage

The idea behind this package is that you can keep using the make:controller commands you are already used to. So no need to change your muscle memory. Checkout the example output to see the result for each command.

Default resource controller

Example output

Default API resource controller

Example output

Model resource controller

Example output

Model API resource controller

Example output

Nested resource controller

Example output

Nested API resource controller

Example output

Variables

In the stubs you can use the following variables.

General

Variable Output
{{ namespace }} App\Http\Controllers
{{ namespacedModel }} App\Models\Order
{{ class }} OrderController
{{ model }} Order
{{ modelVariable }} order
{{ modelVariablePlural }} orders

With parent (--parent=Customer)

Variable Output
{{ namespacedParentModel }} App\Models\Customer
{{ parentModelVariable }} customer
{{ parentModelVariablePlural }} customers

More generator packages

Looking for more ways to speed up your workflow? Make sure to check out these packages.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-improved-resource-controllers with dependencies

PHP Build Version
Package Version
No informations.
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 timwassenburg/laravel-improved-resource-controllers contains the following files

Loading the files please wait ....