Learnings Posts
How To Make a Laravel Application PWA In Few MinutesLaravel

How To Make a Laravel Application PWA In Few MinutesLaravel
Recently, I have created a new package for Laravel Community. it's called Laravel PWA. first of all what is PWA? let me explain a bit more about PWA. PWA means progressive web application. PWA provides a facility to install your web application on mobile and desktop. you don't need to write lots of line code in native platform-specific code.
You can create a PWA site in a few minutes using Laravel PWA.
You can watch the video tutorial as well to install this package.
Step 1:
Install the package by the following command,
composer require ladumor/laravel-pwa
Step 2:
Add Service Provide into app.php
config file in provider section. You can skip this step if you installed it in Laravel 6 and more.
Ladumor\LaravelPwa\PWAServiceProvider::class,
Step 3:
Add Facade to app.php
config file in aliases
section. You can skip this step if you installed it in Laravel 6 and more.
'LaravelPwa' => \Ladumor\LaravelPwa\LaravelPwa::class,
Step 4:
I think installation is done and no need to publish all the assets using the following command,
php artisan laravel-pwa:publish
Step 5:
This step is very important. you published all the assets in the previous step. now, you need to link all the assets in your main blade file. for ex app.blade.php
Add the following code in the root blade file in the header section.
<!-- PWA -->
<meta name="theme-color" content="#6777ef"/>
<link rel="apple-touch-icon" href="{{ asset('logo.PNG') }}">
<link rel="manifest" href="{{ asset('/manifest.json') }}">
Add following code in root blade file before close the body,
<script src="{{ asset('/sw.js') }}"></script>
<script>
if (!navigator.serviceWorker.controller) {
navigator.serviceWorker.register("/sw.js").then(function (reg) {
console.log("Service worker has been registered for scope: " + reg.scope);
});
}
</script>
You should watch this tutorial if you want to set it up manually instead of using this package.
Android 11 Released: Top New FeaturesAndroid Development

Android 11 Released: Top New FeaturesAndroid Development
This is only part of what’s new, as there are over 100 features that serve app developers to further the entire Android experience. On Google's developer website, you can read about it all.
Media controls
While playing music, you can usually see a notification with music controls if you swipe down the notification drawer. However, now in Android 11, these controls are integrated into the Quick Settings menu. So, if you swipe to the top of the screen and with your Bluetooth and Wi-Fi tiles, you can see the music controls.
You can also choose which device will play music, which is accessible if you have Bluetooth earbuds or speakers connected. Drag the menu further down to see other options, such as the ability to select a song without opening the Music app.
Conversations and Bubbles
Google is finally unveiling its official implementation of the conversation bubbles. If you use Facebook Messenger on Android, you will already be familiar with this feature. This feature enables the conversation to stay in floating bubbles that can be moved around the screen and retrieved from within any application.
Google's own documentation says the section will be on "many phones," not all of them, so some manufacturers may choose to display it differently. In any case, apps will need to be updated to tell Android which notifications are conversations.
Screen recorder
Android finally has in-built screen recording. Screen recording in Android 11 is as easy as adding a quick setting tile and clicking it. Before you start recording, you can choose whether you need to record audio from your microphone or you can choose to show touch on the screen.
The new screen recorder can be accessed by tapping the 'Screen Record' tile in Quick Settings - if you don't see it on your device, press the Edit button in Quick Settings and drag the tile from the hidden options. Once you have it, just tap it to start recording.
Power button menu
Android 11 comes with a new power menu that enables you to quickly access all connected smart devices.
To reach the new menu just long-press the power button and control all connected devices like smart locks and thermostats with one click, without the need to open a lot of applications. This latest addition lets us feel like Google has finally brought smartphones to the smart home.
Notification history
Have you ever wondered which apps send the most push alerts to your phone? Did you accidentally clear the notification and aren't sure if you missed something important? If so, you'll love the new Android 11 Notification History page.
Do you ever refresh an instruction before you get a chance to read it? Right now, you don’t have to think that it was something important. Android 11 has launched Notification History which can be accessed by navigating to Settings> Apps & Notifications> Notifications> Notification History.
Improved 5G Support
Android 11 includes enhanced developer support to help you reap the benefits of faster speeds and 5G networks. You can understand that when a user connects to a 5G network, they get an estimate of the connection bandwidth and check if the connection is metered.
On-Page SEO : The Ultimate Guide[2021]SEO
![On-Page SEO : The Ultimate Guide[2021]](https://d37y9b4kfek2hl.cloudfront.net/blog/images/posts/160/on-page-seo-ultimate-guide.png)
On-Page SEO : The Ultimate Guide[2021]SEO
On-page are SEO types are used for ranking your webpage in google at no.1 position to get more traffic. That can take time but it's processed for a one-time setup than organically site rank in google and you get high-quality results.
Here you can get the ultimate guide about on-page SEO and you can apply this process to get results as you expect.
Factors for On-Page SEO
There are some factors that affect while process of on-page SEO.
So, let's get started,
1. Title
The title is the most important factor for the rank website in google. A page title should be attractive for the user if the user doesn't interest in your title then the user never read your blog post.
The title length should be 50 - 60 characters. Google can cut down longer versions of the title and your title doesn't see in google as you expect.
Here is the list for titles:
- Use a keyword in the title
- A Longer version of the keyword used in the title
- CTA - call to action word use
- Don't use stop words
- Use your brand name in the title
2. Metatags
Metatags are also the most important factor for ranking. Metatags consist of a meta title, meta description, meta keyword, etc.
The length of the meta description should be generally 155 to 160 characters.
Metatags represent your whole blog in short. It should be attractive for user expectations.
Google can change your meta description and meta title user's query related but write meta description is required. And it should be relevant to your blog post.
3. SSL Certificate
Users can trust an only secure site if your site has no SSL certificate then it shows not secure so, user cannot trust on this site and don't provide information to this site.
Your site not should be HTTP but should be HTTPS using this gets user trust belongs to your site easily.
Example:
http://infyom.com/ - without an SSL certificate
https://infyom.com/ - with SSL certificate
4. Responsive Website
The website should be mobile-friendliness if not then google can not index a particular webpage or site.
5. Navigation
Navigation of your website is should be easy for users so users can spend more time on your site.
Users can easily go from one page to another page using simple navigation.
You can use a breadcrumbs snippet for easy navigation.
6. Page Loading Speed
Core web vitals plays an important role in page loading speed. Low page loading speed means users can more time spent on a website.
Key factors:
- Images compression
- Compress javascript and CSS files
- Cashed javascript and CSS files
- Light theme
7. Text Visibility
Another important factor is text visibility. Text on your site should be visible to the user. Not used word to white text in the white background is not visible for the user.
8. CTA - Call to Action
Use call-to-action words in your content for getting to user interaction with your content.
Ex. Buy Now, 2 Days left only, Create an account, Free e-book, Explore, Join now, Discover, etc. all are call-to-action words that use in your content to increase user interaction with your content.
9. Img alt text
Always use alt text for every image that is in content. Alt text should be relevant to your image.
Don't use repeat alt text in the same content.
10. Internal Linking
Your site pages should be interlinking with each other for easy navigation. Google can easily understand your site structure if you use interlinking of all pages with each other.
Google can easily crawl them and indexed them in SERP. Using this users can spend more time on your website and you can get a rank in google.
11. External linking
You can do link to high domain authority web pages on your page. This is also a ranking factor in on-page SEO.
Not limit to external linking to your web pages.
12. URL Structure
Use an easy URL structure for your web pages. Don't use a long-form of URL structure.
Conclusion:
All factors are important in on-page SEO points of view so, follow these steps to get a higher ranking in google.
How to Setup Swagger in Laravel ApplicationLaravel

How to Setup Swagger in Laravel ApplicationLaravel
Generally, we are using a Swagger in Laravel. it will take time if we set up swagger manually. so, In this article, I going to show you very easy steps for setup in Laravel.
You can watch the following video tutorial as well.
Steps 1:
You should download these assets from here. unzip the folder and go to the public directory. you can found the swagger
directory in the side public folder. let open the swagger
directory and you can see the following files.
- jquery-2.1.4.min.js
- style.css
- swagger-bundle.js
- swagger.yaml
If are you still confuse then visit this link for files.
now, Copy the swagger
directory and put it in your laravel application on the same path.
Steps 2:
We need to load swagger with proper swagger UI. so, let navigate to resources/views
on the downloaded source code project.
You can see the swagger
directory inside the views
directory.
copy the swagger directory to your laravel application on the same path. I don't think you need to do anything in this view file. let's go to the next step.
Steps 3:
You need to update this swagger.yaml
file. you should update the following details first. and then add APIs documentation in this file. Api document example given here. you can refer it.
info:
description: LPT APis
version: 1.0.0
title: LPT Frontend API's
basePath: /api/
Steps 4:
In this step, you need to create a route for loading swagger docs. so, let's open the web.php
file add the following few lines of code.
Route::get('/docs', function () {
return view('swagger.index');
});
Now, run a command php artisan serve
and open http://127.0.0.1:8000/docs
or open a virtualHostDomain/docs
if you have one.
You should watch this tutorial as well if you using InfyOm Generator
How to connect strapi CMS in gatsby websiteJavascript

How to connect strapi CMS in gatsby websiteJavascript
Gatsby
Gatsby is a blazing-fast website framework for React. It allows developers to build React-based websites within minutes.
Strapi CMS
Strapi is an open-source, Node.js based, Headless CMS that saves developers a lot of development time while giving them the freedom to use their favorite tools and frameworks.
Integrate Gatsby with Strapi
Install gatsby-source-strapi package
npm i gatsby-source-strapi
gatsby-config.js file
- add the gatsby config file in the following code
plugins: [
{
resolve: `gatsby-source-strapi`,
options: {
apiURL: "your strapi server",
contentTypes: ["restaurant"], //add your collections name
queryLimit: 1000,
}
}
]
Now connect your gatsby website and strapi CMS
- Here is an example of the GraphQL API query
import { StaticQuery, graphql } from 'gatsby';
const query = graphql`
query {
allStrapiRestaurant {
edges {
node {
strapiId
name
description
}
}
}
}
`
const IndexPage = () => (
<StaticQuery
query={query}
render={data => (
<ul>
{data.allStrapiRestaurant.edges.map(restaurant => (
<li key={restaurant.node.strapiId}>{restaurant.node.name}</li>
))}
</ul>
)}
/>
);
export default IndexPage;
Hope this helps.
How to Increase Product Sales on the WebsiteSales

How to Increase Product Sales on the WebsiteSales
An easy way I'm going to show you how to increase product sales on the website. Also, you can apply this method and increase your products sales without any problems.
5 Ways to Increase your products sales on the website. Read whole blog content so, you can idea how to increase product sales in a short time.
Let's get started with this reliable technique to increase product sales on the website.
1. First, Know your Buyer's Persona
To reach your ideal customer first know who they are and should they are related to your product or not
Who are your buyers?
first, know who is your customer is and should they are matched with your custom criteria so, you can easily convince them to buy your products.
How to Convince them?
If your customer is relevant to your product niche so, you can easily convince them to buy your products and you can increase product sales.
2. Create Attractive Landing Page
The second step is to create an attractive landing page to attract customers to your website.
Create a simple landing page and describe more about your products so customers know what are the features of your product and how to use them.
Attract more customers to your landing page by adding video and Increase your sales on the website.
3. Add Testimonials & Case Studies of Product
The best way to convince your customer about your product is to add testimonials & case studies. Customers easily attract to this technique and trust your products.
Testimonial is a showing off your products rating and customer review. Good ratings and reviews easily built trust. Using this technique you can increase product sales.
4. Create Urgency
Everyone knows about Amazon. Amazon also creates an urgency to attract customers and sell more products. Urgency like, Hurry Up, Buy now, Sell end in 2 days, 24 hours left it's all are types of urgency.
So people can think about a product that sales are ends in 2days and they can buy before the end of the sale.
5. Give Offer - Money Back Guarantee
One of the most powerful reasons is customers not buying products is the risk factor of money back.
You can give an offer like this If you are not satisfied with our products then we will return your money 100%. If customers see this type of offer so they can think about buying your products. This is an easy way to increase product sales using this technique
Conclusion:
Using this technique you can easily increase your product sales on the website. All techniques are important and reliable.
What Are The Different Types of SEO Techniques?SEO

What Are The Different Types of SEO Techniques?SEO
Today I'm going to show you Types of SEO. Basically, White Hat SEO, Black Hat SEO, Gray Hat SEO are the types of SEO and all are different from each other.
All SEO people or people who want to try to rank a website on google must understand the terms Types of SEO.
So, Let's get started with this topic what are the types of SEO.
1. Types of SEO - White Hat SEO
If you want to Rank organically Website in google as long so, recommended technique is White Hat SEO.
Benefits Of White Hat SEO
- Organic and Ethical SEO Activities are used in white hat SEO.
- A white hat SEO technique is a must for the best long-lasting and sustainable rankings and results.
- For building a positive online reputation this technique is must require.
Techniques of White Hat SEO
- Making SEO websites that is user-friendly according to the Google updates and guidelines.
- Website loading speed technique and responsive website are must user friendly.
- Quality evergreen informative content gives the best results.
- Meta tags and descriptions should be keyword-rich and relevant to page content and URL.
- Keep site structure user friendly.
- Images and videos must be relevant to the page content.
Apply only the white hat SEO technique if you don't want your site panalized.
2. Types of SEO - Black Hat SEO
Black Hat SEO is the Worst among all types of SEO because you apply this technique/type so, google can deindex your site
Don't recommend or try this type of techniques.
Disadvantages of Black Hat SEO
- This is a completely unethical process.
- Violation of SEO guidelines and algorithms.
- Black hat SEO can provide quick and good results in short term but is not sustainable and long-lasting.
- Use of black hat SEO can do your domain black list and remove your website from search engines.
- Black hat tactics are spamming tactics.
- The website would be deindexed for a lifetime by google.
Techniques of Black Hat SEO
- Use of paid links
- Hidden text in the website
- Article spinning
- Hidden links
- Cloaking
- Website over optimzation
- Content scams
- Link manipulation
- SERP spam
- Crooked website
3. Types of SEO - Gray Hat SEO
Gray hat SEO is not white hat SEO or Black hat SEO but it is a combination of white hat SEO & black hat SEO.
In gray hat SEO white hat SEO technique used around 80% to 90% and the Black hat SEO technique used 10% to 20%.
Most people used this technique because in this technique most used white hat SEO.
Sometimes Google can capture black hat SEO techniques in Gray hat SEO that so would be deindexed your site permanently by google.
Conclusion:
In this topic What are the different types of SEO Techniques. White hat SEO techniques are the best for your site which I can recommend and all SEO people also used this technique. So it would be best for all.
How to Implement Browser Push Notification in LaravelLaravel

How to Implement Browser Push Notification in LaravelLaravel
You can watch the following tutorial and you can continue reading this article.
Follow the Steps given here for setup push notification.
Step 1: You can quickly install Push via npm
npm install push.js --save
Step 2: Update webpack.mix.js
Add following code into webpack.mix.js
for copy and publish assets like js in the public directory. you can see the example here
mix.copy('node_modules/push.js/bin/push.min.js',
'public/assets/js/push.min.js');
I hope you know how to use laravel mix. you can watch this video tutorial if you want to know more about the laravel mix.
fire, npm run dev
command and publish js.
Step 3: Add assets in blade file
Add script before closing body tag.
<script src="{{ asset('assets/js/push.min.js') }}"></script>
Step 4: Add this code where you want to show a push
// add logo in public dir and use it here
const iconPath = '{{ asset('logo.PNG') }}
Push.create("Hello Shailesh!",{
body: "Welcome to the Dashboard.",
timeout: 5000,
icon: iconPath
});