Download the PHP package fernandozueet/laravel-doctrine-repository without Composer

On this page you can find all versions of the php package fernandozueet/laravel-doctrine-repository. 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-doctrine-repository

Laravel doctrine repository

Complete repository model with laravel doctrine.

Notices

The doctrine laravel library is used as the base of the repository class. Documentation of lib laravel doctrine

Requirements

Packages


Documentation


Installation

Install this package with composer:

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

To publish the config use:


Step by step

1- Configure your connection to the database .env

2- Configure extra doctrine information. config/doctrine.php

3- Generate the entities

4- Generate repository file.

File will be created by default app/Repositories folder. You can change the folder in the config/doctrine.php file.

ATTENTION!! use the same entity name

Create file inside a folder


Examples

Example class repository

file: app/Repositories/User/UserDocRepository.php

Example interface repository

file: app/Repositories/User/UserRepositoryInterface.php

Example class service provider

file: app/Providers/UserDocRepositoryServiceProvider.php


Using different database connections

Configure the new configuration in managers array the config/doctrine.php file you may notice that the default connection name is default. Insert a new position in the array with the settings

Using the new connection in the repository:

file: app/Repositories/User/UserDocRepository.php


Instantiating the created repository

You can use the repository in your controller, service layer or wherever you want.

If you have created the repository with interface.

1 - Instantiating directly:

2 - Use controller:

if you have not created an interface.

1 - Instantiating directly:

2 - Use controller:


Entering Data (INSERT)

example table: id, first_name, lastName, user_genre_id, updated_at, created_at.

created_at automatically inserted.

file: app/Repositories/User/UserDocRepository.php

Do not automatically inserted createdAt

Dealing with the object of return:

Execute function:


Update Data (UPDATE)

example table: id, first_name, lastName, user_genre_id, updated_at, created_at.

updated_at automatically update.

ATTENTION! To update more than one data, use the method updateQuery.

file: app/Repositories/User/UserDocRepository.php

Do not automatically update updatedAt

Dealing with the object of return:

Execute function:


Update Query Data (UPDATE)

example table: id, first_name, lastName, user_genre_id, updated_at, created_at.

updated_at automatically update.

file: app/Repositories/User/UserDocRepository.php

Creating the condition for the update:

Execute function:


Delete Data (DELETE)

Creating the condition for the delete:

file: app/Repositories/User/UserDocRepository.php

Execute function:


Select Data (SELECT)

Select settings:

file: app/Repositories/User/UserDocRepository.php

Creating the condition for the select:

Creating the order by for the select:

Creating the group by for the select:

Creating the having for the select:

Execute function:


Find by id

Execute function:


Transctions

Execute function:


Dql

Creating query:

file: app/Repositories/User/UserDocRepository.php

Execute function:


Where and having options

These options are valid for where and having.

file: app/Repositories/User/UserDocRepository.php


Order by options

file: app/Repositories/User/UserDocRepository.php


Group by options

file: app/Repositories/User/UserDocRepository.php


Extra functions

file: app/Repositories/User/UserDocRepository.php


Contributing

Please see CONTRIBUTING for details.

Security

If you discover security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The PHP Upload and Image Manipulation is licensed under the MIT license. See License File for more information.


All versions of laravel-doctrine-repository with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
laravel-doctrine/orm Version 1.4.*
beberlei/doctrineextensions Version ^1.1
symfony/property-access Version ^4.1
symfony/serializer Version ^4.1
scienta/doctrine-json-functions Version ~4.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 fernandozueet/laravel-doctrine-repository contains the following files

Loading the files please wait ....