Download the PHP package crazymeeks/php-mongodb without Composer

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

php-mongodb

# php-mongodb is a PHP library that wraps MongoDB\Client library and provides a clean api for interacting with MongoDB database. #

System requirements

Installation

Extend Crazymeeks\MongoDB\Model\AbstractModel class

Inserting data

First approach:

Second approach:

Note: save() and create() methods will automatically add created_at and updated_at
timestamps fields when performing an insert. If you wish to disable this, just add protected $timestamps = true; to your model class.
Or error, this will throw \Exception or \Error when something went wrong.
#

Update

Single

Bulk update

Delete

Single

Bulk delete

#

Finding or Querying data from collection.

Current methods available

whereEq(string $field, string $value) - where equal query and case-insentive.
whereNotEq(string $field, string $value) - where not equal query and case-insensitive.
whereIn(string $field, array($value1, $value2, ...) - Case-insensitive.
whereNotIn(string $field, array($value1, array $value2, ...) - Case-insensitive.
whereGreater(string $field, mixed $value) $value could be int|string. Works great for int types.
whereGreaterOrEq(string $field, mixed $value) - $value could be int|string. Works great for int types.
whereLessThanOrEq(string $field, mixed $value) - $value could be int|string. Works great for int types.
whereLessThan(string $field, mixed $value) - $value could be int|string. Works great for int types.
first() - Returns object that extends \Crazymeeks\MongoDB\Model\AbstractModel. You may count() result of this function for counter checking.
get() - Returns an array object that extends \Crazymeeks\MongoDB\Model\AbstractModel. You may count() result of this function for counter checking.
#

Query samples

Chaining multiple queries

You may chain multiple queries too.

#

Direct Usage

In addition, you may also use all methods available in MongoDB\Client and call it directly in your model.

#

Laravel integration

Register connection to app service provider.

Model

Important: Laravel's relationship is not yet supported.
# Author: Jeff Claud


All versions of php-mongodb with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-mongodb Version *
mongodb/mongodb Version 1.6.1
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 crazymeeks/php-mongodb contains the following files

Loading the files please wait ....