Last active
April 23, 2025 14:32
-
-
Save johnRivs/b324ca653b138417c7916e0e049ca9b2 to your computer and use it in GitHub Desktop.
Laravel stuff for every project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model::unguard(); | |
RequestException::dontTruncate(); | |
Date::use(CarbonImmutable::class); | |
Vite::prefetch(concurrency: 3); | |
Model::automaticallyEagerLoadRelationships(); // how does this play with Model::preventLazyLoading();? | |
Url::forceHttps($this->app->isProduction()); | |
if (! $this->app->isProduction()) { | |
Model::preventLazyLoading(); | |
DB::enableQueryLog(); | |
DB:whenQueryingForLongerThan(300, function($connection) { | |
Log::warning('Long running queries detected.', $connection->getQuerylog()); | |
}); | |
} else { | |
DB::prohibitDestructiveCommands(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tests | |
without vite | |
without exception handling | |
laravel debugbar | |
log viewer https://github.com/opcodesio/log-viewer | |
telescope locally | |
https://laracasts.com/series/build-shopify-apps-with-laravel/episodes/7 | |
https://laracasts.com/series/learn-telescope | |
https://github.com/tnylea/php-ext | |
vite-image-processor-plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: { | |
rollupOptions: { | |
output: { | |
manualChunks(path) { | |
if (path.includes('node_modules')) return 'vendor'; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment