Closed dpasch01 closed 6 years ago
Are you sure you are extending the correct Model ?
Try this in your TestCollection
model
use Jenssegers\Mongodb\Eloquent\Model as Moloquent;
Any update on this? Relations not working for me. Laravel 5.3
FatalErrorException in Builder.php line 613:
Call to a member function all() on array
MySql relations are working fine.
Same error
Call to a member function all() on array
Insight -
App\Video::take(10)
=> Jenssegers\Mongodb\Eloquent\Builder {#714}
DB::collection('video')->take(10)
=> Jenssegers\Mongodb\Query\Builder {#709
Notice both are returning different objects.
@nitinsurana please update you composer dependency version to 3.1.0-alpha
and do run composer update
I can confirm that the error is not there in version 3.1.0-alpha
. You may close this issue.
@pi0 works, thanks.
I am still getting the same error in 3.1.0-alpha.
@alexjose it will certainly work, but if you still have problems you could also try Moloquent :)
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to a member function compileSelect() on null
same issue getting in 3.2 also
call any api its throw an error
FatalErrorException in Builder.php line 1581: Call to a member function compileSelect() on null
After composer update
getting same error with mongodb
DB::collection('test_collection')->all();
works fine, but when i use my TestCollection model i get PHP Fatal error: Call to a member function all() on array in \vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php on line 609.TestCollection model:
TestCollection controller: