{"id":19289435,"url":"https://github.com/adamlc/laravel-mandango","last_synced_at":"2025-04-22T05:31:23.599Z","repository":{"id":9975232,"uuid":"12001688","full_name":"adamlc/laravel-mandango","owner":"adamlc","description":"A package for Laravel 4 to integrate Mandango ODM","archived":false,"fork":false,"pushed_at":"2013-08-12T07:52:37.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-19T02:42:43.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamlc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-09T13:38:38.000Z","updated_at":"2024-04-19T02:42:43.303Z","dependencies_parsed_at":"2022-09-02T12:53:32.865Z","dependency_job_id":null,"html_url":"https://github.com/adamlc/laravel-mandango","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Flaravel-mandango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Flaravel-mandango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Flaravel-mandango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlc%2Flaravel-mandango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamlc","download_url":"https://codeload.github.com/adamlc/laravel-mandango/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223888357,"owners_count":17220084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:15:06.421Z","updated_at":"2025-04-22T05:31:23.562Z","avatar_url":"https://github.com/adamlc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Laravel Mandango\n================\n\nThis small package will allow you to use the Mandango ODM in your Laravel application.\n\nThis package has been thrown together quite quickly. I will update it when I have time!\n\n\n## Composer\n\nTo install Laravel Mandango as a Composer package to be used with Laravel 4, add this to your composer.json:\n\n```json\n\"adamlc/laravel-mandango\": \"dev-master\"\n```\n\nRun `composer update`.\n\nOnce it's installed, you can register the service provider and facade in `app/config/app.php`:\n\n```php\n'providers' =\u003e array(\n    'Adamlc\\LaravelMandango\\LaravelMandangoServiceProvider',\n)\n```\n\n```php\n'aliases' =\u003e array(\n\t'Mandango' =\u003e 'Adamlc\\LaravelMandango\\LaravelMandangoFacade'\n)\n```\n\nThen publish the config file with `php artisan config:publish adamlc/laravel-mandango`. This will add the file `app/config/packages/adamlc/laravel-mandango/mandango.php`.\n\n\n## Configuration\n\nIn the configuration file you will need to configure you MongoDB connection and setup your [Mondator schema](http://mandango.org/doc/mandango/mondator.html) which will be used for automatic class generation.\n\n\n## Mondator Class Generation\n\nOnce you have configured your schema as per the documentation you need to run thr artisan command to generate the classes, make sure you run `composer dump-autoload` followed by `php artisan mondator:run`\n\nWhen Mandator has generated your classes you need to tell composer how to auto load them. Add the following to your composer.json under classmap:\n\n```json\n\"classmap\": [\n\t\"app/mandango\"\n],\n```\n\nAfter that make sure you do another `composer dump-autoload`\n\n\n## Usage\n\nOnce the above steps have been completed you can simply get your repository by calling like this:\n\n```php\n$articleRepository = Mandango::getRepository('Model\\Article');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamlc%2Flaravel-mandango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamlc%2Flaravel-mandango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamlc%2Flaravel-mandango/lists"}