thecodeholic / laravel-10-blog

Laravel 10 blog starter kit
116 stars 51 forks source link

latest laravel 10 #1

Open born2hate opened 1 year ago

born2hate commented 1 year ago

when installing on latest laravel 10, have such errors as sql queries GROUPBY problem..

SQLSTATE[42000]: Syntax error or access violation: 1055 'XXX_blog.posts.title' isn't in GROUP BY (Connection: mysql, SQL: select posts.*, COUNT(upvote_downvotes.id) as upvote_count from posts left join upvote_downvotes on posts.id = upvote_downvotes.post_id where (upvote_downvotes.is_upvote is null or upvote_downvotes.is_upvote = 1) and active = 1 and date(published_at) < 2023-04-04 group by posts.id order by upvote_count desc limit 5)

picory commented 1 year ago

installation error how can i do for below?

$ docker run --rm \

-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs

In Filesystem.php line 254:

/var/www/html/vendor does not exist and could not be created.

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]

picory commented 1 year ago

installation error how can i do for below?

$ docker run --rm \

-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs

In Filesystem.php line 254:

/var/www/html/vendor does not exist and could not be created.

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]

self answer.

docker-compose.yml is same laravel sail project. so if you have a error message like above, you must install laravel sail project.

curl -s https://laravel.build/temp_project | bash cd temp_project ./vendor/bin/sail up -d

if you shoud success installing laravel sail, exec "docker-compose up -d".

furqanaleem commented 1 year ago

when i'm trying to login to admin just redirecting to forbidde 403 page