Tag : Laravel

When using mysql driver in Laravel, save the following code $result = $model->create($data); Or $model->name = ‘name’; $result = $model->save(); After completion, $result will automatically obtain the current id and update the current model. to put it bluntly, $result returns the currently inserted model and contains the primary key.However, using jenssegers/laravel-mongodb only returns a true ..

Read more

Because of the array, how do I optimize saving this array into the database, whether there are as many writes as there are save one by one, or whether it will be buffered until one write is executed.And what is larave-mongodb-sentry Don’t cycle through each insertion, you can insert it at one time.http://stackoverflow.com/questions/23819843/laravel-multiple-insert-..

Read more

I tried to access the execution results in the docker container from this machine. The following is my attempt: step1.A php-composer image was created using dockerFile. FROM php:7 RUN apt-get update RUN apt-get install curl RUN curl -sS https://getcomposer.org/installer -o composer-setup.php RUN php composer-setup.php –install-dir=/usr/local/bin –filename=composer RUN apt-get install -y git step2.Create a container and ..

Read more

Run the laravel framework in the docker environment and use the predis extension. Error reporting when linking redis: At last, docker’s system environment variable covered laravel’s. env variable.There are two solutions Add the following code under docker-compose.yml file environment: REDIS_PORT: 6379 I tried this method but it didn’t work. I don’t know why. I’m trying ..

Read more

Github of laradock https://github.com/laradock/l … I saw that there is no ik word segmentation plug-in in the Dockerfile in the elasticsearch. FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1 EXPOSE 9200 9300 Excuse me, how does this install ik Chinese Word Segmentation Plug-in? Elasticsearch installs ik plug-ins, right FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1 # Add your elasticsearch plugins setup here # Example: RUN elasticsearch-plugin ..

Read more

1. I use laradock to configure the development environment and the service can start normally. Now I want to turn On display_errors=On. I also changed the display_errors settings of php-fpm/php70.ini and laravel.ini to on. after the change, I restarted nginx and php-fpm, but when I refreshed the phpinfo page, display_errors still showed off.How can I ..

Read more