Skip to content

Instantly share code, notes, and snippets.

View tomaserlebach's full-sized avatar

Tomas Erlebach tomaserlebach

  • Hanseatic Bank
  • Lübeck / Germany
View GitHub Profile
@tomaserlebach
tomaserlebach / gist:9389335cacb48a0a4b939e1383727a4b
Created December 17, 2022 14:46
Docker Command to install Composer dependencies without having PHP installed
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
@tomaserlebach
tomaserlebach / laravel_inertia_fix_axios_401.md
Last active April 4, 2022 06:55
Fix Laravel API returns 401 on axios request

If you are using axios inside Inertia and you are running into 401 responses when trying to make axios requests on a Laravel API you should check your app/Http/Kernel.php.

Ensure that the Class EnsureFrontendRequestsAreStateful is not commented out.

app/Http/Kernel.php:

        'api' => [
            \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
 'throttle:api',
@tomaserlebach
tomaserlebach / shop_settings.txt
Last active March 15, 2021 09:51
JTL-Shop useful settings for config.JTL- Shop.ini.php
#TEMPLATE HINT
define('SHOW_TEMPLATE_HINTS', 1); // Show template hints as comments
define('SHOW_TEMPLATE_HINTS', 2); // Show template hints onpage
define('SHOW_TEMPLATE_HINTS', 3); // JS output