Download the PHP package techapi/mongo-laravel without Composer

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

Mongo Laravel

Uma biblioteca Laravel para integração simplificada com MongoDB, oferecendo uma interface fluente e intuitiva para operações com banco de dados MongoDB.

📋 Requisitos

🔧 Verificação e Instalação da Extensão MongoDB

Antes de usar esta biblioteca, você deve ter a extensão MongoDB instalada no PHP.

Verificar se a extensão está instalada

Se não retornar nada, a extensão não está instalada.

Instalação da Extensão MongoDB

🐧 Linux (Ubuntu/Debian)

🍎 macOS

🪟 Windows

  1. Baixe a extensão MongoDB apropriada do PECL
  2. Extraia o arquivo php_mongodb.dll para a pasta ext do PHP
  3. Adicione extension=mongodb ao arquivo php.ini
  4. Reinicie o servidor web

📦 Instalação

1. Instalar via Composer

2. Configurar Conexão com MongoDB

Adicione a configuração do MongoDB no arquivo config/database.php:

3. Configurar Variáveis de Ambiente

Adicione as seguintes variáveis ao seu arquivo .env:

4. Publicar Service Provider (Opcional)

O package possui auto-discovery habilitado, mas se precisar registrar manualmente, adicione em config/app.php:

🚀 Uso

Criando um Model

Use o comando artisan para criar um novo model:

Ou especificando o nome da collection:

Isso criará um model em app/Models/User.php:

Operações Básicas

Criar Documento

Criar ou Atualizar Documento

Buscar Um Documento

Buscar com Paginação

Métodos Disponíveis

Método Descrição Parâmetros
create() Cria um novo documento array $data
createOrUpdate() Cria ou atualiza documento array $data, array $filter
findOneData() Busca um documento array $filter
findAllWithPaginate() Busca com paginação array $filter = [], int $limit = 10, int $page = 1
toArray() Converte resultado para array -

📝 Exemplos Práticos

Exemplo Completo de CRUD

Filtros Avançados

🔍 Troubleshooting

Erro: "Class 'MongoDB\Driver\Manager' not found"

Erro: "Connection refused"

Erro: "Authentication failed"

🤝 Contribuição

  1. Faça um fork do projeto
  2. Crie uma branch para sua feature (git checkout -b feature/AmazingFeature)
  3. Commit suas mudanças (git commit -m 'Add some AmazingFeature')
  4. Push para a branch (git push origin feature/AmazingFeature)
  5. Abra um Pull Request

📄 Licença

Este projeto está licenciado sob a Licença MIT - veja o arquivo LICENSE para detalhes.

🆘 Suporte

Para questões e suporte, abra uma issue no GitHub.


All versions of mongo-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0 || ^12.0
jenssegers/mongodb Version ^5.4
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 techapi/mongo-laravel contains the following files

Loading the files please wait ...