Category : laravel

I’m creating an app using docker and laravel. At the beginning everything was fine, I ran the migrations successfully. But at some point an error occured while migrating and trying one of the routes on Postman: IlluminateDatabaseQueryException SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = users and table_name ..

Read more

I’ve built a laravel app using docker with two containers, docker-compose.yml: version: ‘3.8’ services: users: build: context: . dockerfile: Dockerfile environment: DB_HOST: db DB_USERNAME: root DB_DATABASE: users DB_PASSWORD: root command: ‘php artisan serve’ volumes: – .:/app ports: – 8001:8000 depends_on: – db db: image: mysql:5.7.22 environment: MYSQL_USER: root MYSQL_DATABASE: users MYSQL_PASSWORD: root MYSQL_ROOT_PASSWORD: root volumes: ..

Read more

#change ownership of our applications RUN chown -R www-data:www-data /var/www/html/storage RUN chown -R www-data:www-data /var/www/html RUN chown -R www-data:www-data /var/www/html/bootstrap/cache RUN chmod -R 755 /var/www/html/storage RUN chmod -R 755 /var/www/html/bootstrap/cache These are the above commands I added in my dockerfile to avoid permission error but the issue is when i run this dockerfile in my ..

Read more

I try to set up a MySQL interaction with Laravel, but it gives me a pretty odd error set. When my .env db parameters are set like that: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=example_app DB_USERNAME=sail DB_PASSWORD=password everything works fine in artisan and CLI section, BUT localhost response to such setting replies with IlluminateDatabaseQueryException SQLSTATE[HY000] [2002] Connection refused ..

Read more

I try to set up a MySQL interaction with Laravel, but it gives me a pretty odd error set. When my .env db parameters are set like that: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=example_app DB_USERNAME=sail DB_PASSWORD=password everything works fine in artisan and CLI section, BUT localhost response to such setting replies with IlluminateDatabaseQueryException SQLSTATE[HY000] [2002] Connection refused ..

Read more

I’m creating routes for my Lumen app and I ran into the following problem. The default route has the expected return web.php $router->get(‘/’, function () use ($router) { return $router->app->version(); }); the return value: Lumen (8.2.4) (Laravel Components ^8.0) but for any URI other than this we have the following error message 500 Internal Server ..

Read more