Download the PHP package webtack/generic-controller without Composer

On this page you can find all versions of the php package webtack/generic-controller. 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 generic-controller

Generic Controllers

Generic Controllers is a extension system for your Laravel application.
Generic Controllers includes a set of generic representations that are ideally suited for solving a number of routine tasks.

Installation

Install using composer:

Simple examples

Use Generic as the parent classes. You can specify these classes as the parent for your custom view class and override the attribute values in the body of your class

TemplateController

Suitable for displaying static pages that do not receive data from the database.

Create a router and call the method in it @asView

DetailController

It should be used when you want to get one model for a given key

Create a router and call the method in it @asView

Context data

The method responsible for obtaining data from the database.
By default, there will be an attempt to get the model by the parameter id from the route

But you can override this behavior by overloading this method. It must return an array with a context name key and an object of the model.

Or override get method

Supported methods correspond to request types.

All methods accept the first object \Illuminate\Http\Request $request The following parameters can be those that you defined in your routes.

View Name

By default, DetailController will search for a view with the name of the "article-page" class new, and you will also be able to override it in the templateName method

Note the auxiliary methods templatePrefix and templateSuffix.
If you define them, the data will be appended to the name of the view returned by the method templateName

Context name

The name of the access variable in the view will be taken from the name of the model class starting with a small letter.

Of course you can override this in method contextObjectName

ListController

Use to display the list of entities

Create a router and call the method in it @asView

By default, the name of the view will be appended with the suffix - list, but you can undo or override this behavior in the corresponding method, of course.

P.S.

This is a small set of possibilities. But I think in the future I will expand it if necessary.


All versions of generic-controller with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
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 webtack/generic-controller contains the following files

Loading the files please wait ....