Laravel Frontend
For all the documentation refer to the Acanto Framework Docs.
This package is automatically mirrored as a standalone repository to GitLab through a postpublish
npm script that lerna
run after its publish
work. Composer installs acanto/laravel-frontend
through the packagist.org's package which points to this public GitLab repo.
Migration
0.x to 1.x
In your project using LaravelFrontend
update:
-
./composer.json
: bump"barryvdh/laravel-debugbar"
to"^3.6"
How to
Develop this package locally
Simply symlink your development version inside the project's vendor
folder.
Use a forked package
Add to your project's composer.json
:
"repositories": [
{
"type": "vcs",
"url": "git@git.acanto.net:acanto-forks/laravel-page-speed.git"
}
],
"require": {
"renatomarinho/laravel-page-speed": "dev-master"
}
One liners
One liner to clear local cache:
php artisan config:clear && php artisan route:clear && php artisan view:clear && php artisan cache:clear && composer dump-autoload
One liner to optimize laravel:
php artisan config:cache && php artisan route:cache && php artisan view:cache && composer dump-autoload
Development
Notes
- to manage trailing slashes we might use illuminatech/url-trailing-slash
- Take a deeper look at package-skeleton-laravel
- About protecting http request based image resizing with signed URL
- Laravel optimization
- Laravel optimization
- A way to handle authentication through just session and cookies and comunicate with API, for Laravel 6.0
- Laravel Resources to create intermediary between thirdy-part API and laravel application
- Laroute, package to pass laravel routes to js (might be useful to implement barba.js)
- Usecase about Laravel routes optimization
- About creating a middleware to check incoming requests domain, this is useful to create protected hooks for the CMS to clear/manages the cache on specific actions, e.g. saving a new product during data entry
- About not using env outside config files to get cache and speed
- About authentication with external API: recent, 1 2, 3
- About Laravel and OPcache
Flood prevention
- Old and small antiflood system for Laravel
- About Laravel's throttle middleware and load balancer HAProxy
Caching
- Middleware
throttle
might cause high disk IO if we use it too much (e.g. for images) with a cachefile
driver (source) - Performance comparison of cache drivers
- Alternative cache system with tagging for file driver cache: alternative-laravel-cache, see laravel 9 support issue (we followed the suggested swap of cache adapter dependency and it works)
- Cache tagging library for file driver cache: taggedFileCache
- Cache library for Laravel laravel-responsecache
Sitemap
- Can a sitemap not be at the root of the website?
- Images sitemap to boost SEO friendly images names despite hashed cached images filenames: we could generate an image sitemap that would read all the cache and map original filenames from the CMS (cleaned up of their timestamp) to each URL of its cropped/resized/transformed versions. Another way would be to perhaps use
iptc
images metadata, Intervention supports it withgd
driver too.