Adding AMP to your laravel site
I became curious on how to add AMP to my sites well never to late learning something new, because mostly of my development are using laravel so i tried in it. at first i was confused of the concept AMP is it like responsive pages do i have to make a new subdomain (overkill) or make a new prefix url?
The answer is make a new prefix url at least my answer is maybe there's another way, but here's how it goes.
First make this mapAmpRoutes at your RouteServiceProvider.php then add that protected class to your map class as stated below
then just simply create amp.php at routes, copy all the web to amp
[Update] After trying AMP working on my site, well it really helps a lot, as I said before I thought that by making AMP site you won't get any revenue but it's not, you can set all you want in AMP but make sure there's a tag for it also analytics too it works i made it the same tracker and it works.
The key that really make this works is linking the site from main site to the amp site by using amphtml tag, this is to get google to read the site as amp site... I thought i needed to submit the amp links but you actually don't google will do it for you
<link rel="amphtml" href="#">
then in the amp site add a canonical to the real page
<link rel="canonical" href="#">