Support the ongoing development of Laravel.io →
Configuration Database Packages
Last updated 2 years ago.
0

I'm in the same boat... I have been looking at two possible packages to use...

  • jenssegers/mongodb
  • atrauzzi/laravel-doctrine

I'm thinking of going with doctrine, even if it's a beta, just because it's a bigger project, and I have heard more about it. And if we want to add more types of databases in the future to store specific data, using doctrine will probably make it easier to work with.

Last updated 2 years ago.
0

Hi,

I have used https://github.com/navruzm/lmongo and it was ok. I actually built with it a CRUD using bootstrap . ( I don't have the code on github) . I have also used https://github.com/navruzm/laravel-mongo-auth for the Auth.

I would stay way from doctrine2 .

Last updated 2 years ago.
0

https://packagist.org/packages/jenssegers/mongodb is the best. combined with way generators and you will get your laravel app with mongodb up and running in no time, using the usual eloquent methods. Laravel Auth works great too.

Last updated 2 years ago.
0

@infinityfish: I am also using the jenssegers/mongodb package. Were you able to get it working well with Form Model binding? I am having a hard time getting nested and array style fields to work.

For example, if I have a form setup like this:

{{ Form::model($model) }}
{{ Form::text('name') }}
{{ Form::select('specialty[0]', array('laravel' => 'Laravel', 'cake' => 'CakePHP', 'zend' => 'Zend Framework', 'none' => 'None')) }}
{{ Form::select('specialty[1]', array('laravel' => 'Laravel', 'cake' => 'CakePHP', 'zend' => 'Zend Framework', 'none' => 'None')) }}
{{ Form::select('specialty[2]', array('laravel' => 'Laravel', 'cake' => 'CakePHP', 'zend' => 'Zend Framework', 'none' => 'None')) }}
{{ Form::close() }}

When this gets saved to MongoDB, it is saved to the collection just fine. We get an object that liiks like this:

{
  "_id": ObjectId('....'),
  "name": "Adam Duro",

  "specialty": ["laravel", "cake", "zend"],
}

However, when I return to the page, the select boxes are set back to their default states, and the model data is not displayed.

Is there something wrong with how I am implementing my Form Model Binding in the view?

AD

Last updated 2 years ago.
0

duro said:

@infinityfish: I am also using the jenssegers/mongodb package. Were you able to get it working well with Form Model binding? I am having a hard time getting nested and array style fields to work.

For example, if I have a form setup like this:

{{ Form::model($model) }}
{{ Form::text('name') }}
{{ Form::select('specialty[0]', array('laravel' => 'Laravel', 'cake' => 'CakePHP', 'zend' => 'Zend Framework', 'none' => 'None')) }}
{{ Form::select('specialty[1]', array('laravel' => 'Laravel', 'cake' => 'CakePHP', 'zend' => 'Zend Framework', 'none' => 'None')) }}
{{ Form::select('specialty[2]', array('laravel' => 'Laravel', 'cake' => 'CakePHP', 'zend' => 'Zend Framework', 'none' => 'None')) }}
{{ Form::close() }}

When this gets saved to MongoDB, it is saved to the collection just fine. We get an object that liiks like this:

{
 "_id": ObjectId('....'),
 "name": "Adam Duro",

 "specialty": ["laravel", "cake", "zend"],
}

However, when I return to the page, the select boxes are set back to their default states, and the model data is not displayed.

Is there something wrong with how I am implementing my Form Model Binding in the view?

AD

What are you trying to get instead of simple array? For the code you provided this is totally ok result.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

sgaknis sgaknis Joined 11 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.