I follow the steps on this video, the MongoDB connection is successful, but when I try to register a user or store data using a model, I get this error message. Error Call to a member function prepare() on null Please how do I resolve this challenge?
Great about the successful connection! Was the model declared using the MongoDB Extension? "use Illuminate\Database\Eloquent\Model;" is replaced by "use MongoDB\Laravel\Eloquent\Model;"
Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires mongodb/laravel-mongodb 4.0.0 -> satisfiable by mongodb/laravel-mongodb[4.0.0]. - mongodb/laravel-mongodb 4.0.0 requires ext-mongodb ^1.15 -> it is missing from your system. Install or enable PHP's mongodb extension. Problem 2 - mongodb/mongodb 1.12.0 requires ext-mongodb ^1.13.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb[1.13.0, ..., 1.13.1] require ext-mongodb ^1.14.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb 1.15.0 requires ext-mongodb ^1.15.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb[1.16.0, ..., 1.16.1] require ext-mongodb ^1.16.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb 1.17.0 requires ext-mongodb ^1.17.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - Root composer.json requires mongodb/mongodb ^1.12 -> satisfiable by mongodb/mongodb[1.12.0, ..., 1.17.0]. To enable extensions, verify that they are enabled in your .ini files: - C:\xampp\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-mongodb` to temporarily ignore these required extensions. Installation failed, reverting ./composer.json to its original content. please suggest me how to connect and what changes required in php.ini file for connect mongo with laravel
@@hubertnguyen1309 Problem 1 - Root composer.json requires mongodb/laravel-mongodb 4.0.0 -> satisfiable by mongodb/laravel-mongodb[4.0.0]. - mongodb/laravel-mongodb 4.0.0 requires illuminate/support ^10.0 -> found illuminate/support[v10.0.0, ..., v10.43.0] but these were not loaded, likely because it conflicts with another require.
Usually, this might happen when using an old MongoDB extension, or perhaps the extension was not loaded via php.ini. Does this happen using our CodeSpaces, or do you have your own PHP stack?
8 месяцев назад
I use laragon and php 8.1 , i was reviewed the php.ini and is active the extensión=php_mongodb.dll But when i try to install the laravel-mongo package in laravel 10, I got the same error 😢 may you help me with a url to download a correct file to My php version (Windows x64) Or tell me some guide to repair the error.? I agree your effort and excelent video... Thsnks
8 месяцев назад
Please can you help me,how can i access to your CodeSpaces?
Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires mongodb/laravel-mongodb 4.0.0 -> satisfiable by mongodb/laravel-mongodb[4.0.0]. - mongodb/laravel-mongodb 4.0.0 requires ext-mongodb ^1.15 -> it is missing from your system. Install or enable PHP's mongodb extension. Problem 2 - mongodb/mongodb 1.12.0 requires ext-mongodb ^1.13.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb[1.13.0, ..., 1.13.1] require ext-mongodb ^1.14.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb 1.15.0 requires ext-mongodb ^1.15.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb[1.16.0, ..., 1.16.1] require ext-mongodb ^1.16.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - mongodb/mongodb 1.17.0 requires ext-mongodb ^1.17.0 -> it is missing from your system. Install or enable PHP's mongodb extension. - Root composer.json requires mongodb/mongodb ^1.12 -> satisfiable by mongodb/mongodb[1.12.0, ..., 1.17.0]. To enable extensions, verify that they are enabled in your .ini files: - C:\xampp\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-mongodb` to temporarily ignore these required extensions. Installation failed, reverting ./composer.json to its original content. I am facing this error please provide me solution