version: 1.3 Updated deps:
Don't forget to npm run production
to rebuild all js files
Removed Laravel 9 Label =) cause it's Larvel 8 =)
version: 1.2 check the working version on laravel.lots-of-online.work only version 1.2
Uses:
-Laravel 8 - Basic Example-app
-Mcamara/laravel-localization https://github.com/mcamara/laravel-localization
-Alpine.js https://github.com/alpinejs/alpine
-TailwindCss https://tailwindcss.com/
-Kitwind UI https://kitwind.io/products/kometa
-Laravel Mix Extract Media Queries https://github.com/elambro/laravel-mix-extract-media-queries
-Laravelium Sitemap package https://github.com/Laravelium/laravel-sitemap
-Spatie / laravel-cookie-consent https://github.com/spatie/laravel-cookie-consent
-Laravel HTML Minifier https://github.com/dipeshsukhia/laravel-html-minify
The main goal is to create a multilingual landing page starter kit with full SEO titles and headings and with Google Pagespeed close to 100.
Made just for me, but anyone can use and modify if needed =)
In this version, I got 80-100 points in desktop version and 90-100 points in mobile with Font-awesome CDN enabled and 100/100 score without fonts. The results may vary due to the server.
PHP 8+. If you do not have PHP 8 and want to use PHP 7 you should remove "Spatie / laravel-cookie-consent" or downgrade it to lower version. Read discussion on their gitHub.
Version 1.2
Version 1.1
Version 1.0
composer install
npm i
npm run dev
php artisan serve
git clone https://github.com/seosmmbusiness/multilang-laravel-kit.git
to your home directory and open itcomposer install --no-dev
php artisan key:generate
puclic_html
or /var/www/html
be or the one your apache server uses) from multilang-laravel-kit/public
In my case ln -s /home/user/multilang-laravel-kit/public /home/user/public_html
or
change your Apache server public dir to laravel project's public dirphp artisan optimize
php artisan route:trans:cache
In version 1.2
Basicly my practice: I put tag manager scripts with in header-scripts component and middle-scripts component. After that you can check for cookie generated by 'laravel-cookie-consent' in your Tag Manager.
For ads, I run the basic Adsense script in header or footer.
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
<script>
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1; //Pauses the ads until get the agreement
(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client: "ca-pub-XXXXXX", enable_page_level_ads: true});
</script>
And after that in the scriptsToRun write:
(adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=0; //or 1 if you do not want to run personalized ads.
(adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=0; //Start running ads
So once the visitor accepts with cookies the ads runs.
Feel free to contact me or open an Issue =)
Already solved. Will leave it here for some time. In case "npm run prod" shows error "TypeError: compiler.plugin is not a function" with "extract-css-media-queries" plugin possibly there is an case with a new webpack plugin system.
Make sure that the file "src/index.js" in "extract-css-media-queries" in "node_modules" has "compiler.hooks.emit.tapAsync('emit', (compilation, callback) => {" instead of "compiler.plugin('emit', (compilation, callback) => {"
Thank you for considering contributing to the Laravel 8 + Tailwind + Alpine JS Multilanguage Landing Page Starter Kit!
The Laravel framework is open-sourced software licensed under the MIT license.
Contact me to add your website ;)