Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

sail add php mongodb extension

#Step 1 
#edit vendor/laravel/sail/runtimes/[PHP VERSION]/Dockerfile
#Ex: ./vendor/laravel/sail/runtimes/8.1/Dockerfile

#Step 2 
#Add the command at Dockerfile file
RUN apt-get install -y php8.1-mongodb
  
#Step 3 
#Save it and then run ./vendor/bin/sail build and ./vendor/bin/sail up -d
./vendor/bin/sail build && ./vendor/bin/sail up -d

## Tutorials:
# https://developpaper.com/laravel-sail-add-mongodb/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sail #add #php #mongodb #extension
ADD COMMENT
Topic
Name
6+7 =