Download the PHP package windawake/laravelremodel without Composer

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

laravel remote model

中文 日本語

Create remote driver to convert remote api request into laravel model.

In order to discuss technology with me, you can add me to wechat.

overview

Install the version between laravel5.5-laravel8, and then install the quick microservice package.

composer require windawake/laravelremodel dev-master

First execute the command php artisan laravelremodel:example-models to copy the three files OrderDetailRemote.php, OrderRemote.php, and ProductRemote.php (under the ./vendor/windawake/laravelremodel/examples/Models directory) into the app folder.

Then execute command to create the SQLite database file test.db

Add the configuration of sqlite and adds testsuite of Remote in phpunit.xml.

Finally, run the test command ./vendor/bin/phpunit --testsuit=Remote The running results are shown below, 18 orm examples have passed in the test.

features

  1. The app backend code does not need to be refactored, and it is gradually realizing the progressive service of API interface.
  2. Support lazy loading, avoiding 1+n query api.
  3. Supports join tables, union tables, native SQL queries, aggregate queries, sub-queries, etc. Almost all laravel orm features can be used.
  4. The laravel service container writing method is used, so the query compiler and distributed transaction methods can be customized. (Distributed transaction component is recommended).

principle

The api interface of the remote basic service is encapsulated into an ORM. The my app model is just a virtual model, which is a mirror image of remote basic service model. For example, the purple ProductModel is a mirror image, but OrderLogic uses it almost the same as the white ProductModel. What are the benefits of doing this? All the features of the laravel model can be reused. Because many packages now do a lot of new functions for the model, it is a pity not to use them.

how to use

Create a new ProductRemote class that inherits the RemoteModel class.

The above is an example of querying getHandle. By default, 5 methods are provided: getHandle, updateHandle, insertGetIdHandle, deleteHandle and existsHandle. After inheriting the RemoteModel class, without defining these methods such as getHandle, it will use the db drive by default, just like the normal Model class.

model method similar to mysql syntax purpose
getHandle select Query list, query details, query aggregation operations (count, max, etc.)
updateHandle update Update record
insertGetIdHandle insert Insert record
deleteHandle delete Delete record
existsHandle select Determine whether it exists

All versions of laravelremodel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.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 windawake/laravelremodel contains the following files

Loading the files please wait ....