InfyOm Blog

latest-post

In our daily life, we are going through lots of packages, and some of us don't know how to build our own package into Laravel.

We are going to perform the core steps to create your own package in laravel. In this tutorial we are going to build zoom package, so we will perform steps related to it.

Setup Fresh Laravel Repo 

Setup fresh laravel repo, and then create directories within it. 

for e.g Create infyomlabs/zoom-api directory into root.


Now create src directory into zoom-api

Run Composer init Into src Directory

After hitting composer init it will ask some information from you, as you can see in below image I have entered some of information. you can just hit enter if you do not want to add other information.


Add your config file (Optional)

Create directory config into src directory and add your config.php file there from where you can manage your env variables. 


Add Service Provider

Create your service provider from where you can do lots of actions. like you can publish config/routes/ migrations files from there. here we are publishing the zoom config file. 


Add your class (Which contains all functions) 

Here we have added a Zoom class which will be contained all zoom functions. 

Update Composer.json 


Finally, Test it in your existing project

Put the following code to your main composer.json (in your project's root). and hit composer update

  "repositories": [
        {
            "type": "path",
            "url": "infyomlabs/zoom-api",
            "options": {
                "symlink": true
            }
        }
    ],
    "license": "MIT",
    "require": {
        "infyomlabs/zoom-api": "dev-develop"
    },


January 27, 20211 minuteuserVishal Ribdiya

Posts

post

What is Performance Testing?

Performance testing, which is a non-functional testing method performed to determine system parameters in terms of responsiveness and stability under various workloads.  Performance testing measures the quality characteristics of a system, such as scalability, reliability, and resource use. 

Types of Performance Testing


There are mainly six types of performance testing Let's see in detail.

Load Testing

It is the simplest form of testing conducted to understand the behavior of the system under a specific load.  The load tests will determine the measurement of important business critical transactions and will also monitor the load on the database, application server, etc. 

Stress Testing

It is performed to find the upper limit capacity of the system and also to determine how the system is operating if the current load greatly exceeds the expected maximum. 

Spike Testing

The Spike test is performed by suddenly increasing the number of users by a very large amount and measuring system performance.  The main objective is to determine whether the system will be able to carry the workload. 

Scalability testing 

 It Measures performance based on the software's ability to increase or decrease performance measurement attributes.  For example, a scalability test could be performed based on the number of user requests. 

Volume Testing

Under large test volume no.  From.  The data is filled in a database and the overall behavior of the program system is monitored.  The goal is to check the performance of the software application under different database sizes. 

Endurance Testing

It is done to make sure the software can handle the expected load over a long period of time.

 We will see full performance testing process points in our next article, to be continue..
January 11, 20211 minuteauthorBhumi Khimani
post

GIF logo file formats are not as widely used as they once were. They have a very limited color spectrum (only 256 colors out of millions in JPG) so solid color logos are a good candidate for this format. A special feature of the GIF file is that it supports smooth animation. You can create frames with frame animations and file sizes will be negligible as long as you keep the color flat and smooth (from red to blue). GIF files are pixel-based and do not expand well.


EPS and AI logo file formats are a sacred grail of file formats. They are made up of dots and lines, not pixels, allowing infinite scaling and expansion without losing quality. Many business owners and executives ignore these logo file formats because they cannot open them normally. Many common MS Office fee programs do not open the EPS logo file format. EPS files can also support pixels, which also makes this file format difficult. Software such as Adobe Illustrator, InDesign, or Photoshop can work with this file format and optimize and save almost any logo file format you need. Illustrator will allow resizing, color mode change, and more.

PDF logo file formats can also be difficult as PDF color mode can disguise spectra and resolution. Some common office fee software will open or import PDFs but one way to tell if the resolution is good is to zoom in very closely to the logo. If the edges stay crisp, you’re in business and a graphic designer who can use something in print and digital applications. If the edges become blurred or pixelated, you will be limited in the use and extension of this particular logo file format.

SVG files have become more common on websites and digital access and are considered the standard format for displaying vector graphics on the web. SVG logo file formats allow a resizable logo format that does not lose image quality as it is expanded or reduced. This is especially important with responsive web design where the logo file can be resized depending on the digital device the website is viewing. Another major advantage for the SVG logo file format is the relatively small file size - which allows a digital file to load on a website very quickly. Support is limited to SVG but website design is an important place for their use.

January 08, 20212 minutesauthorKishan Savaliya
post

Many successful small business owners are constantly looking to expand their customer base and grow their businesses. However, business growth can be a difficult and long-term process. One of the key elements of growing a business is constant access to a steady stream of sales leads. A lead is a person or business if you have a company that sells to other businesses that are interested in the products or services you sell.

Here are some tips for building a system that will help you identify sales leads in your small business, and - with the right focus and effort - turn them into customers.

1. Increase your engagement with your customers

Relationships are all about sales and talking to the people who reach out to you to do so. For example, when people reach you with questions about your product or company, instead of just mentioning them on your blog, you can ask them if they mind having a quick chat with you.

2. Constantly refresh your email lists

It is impossible to generate leads from an old email list that contains incorrect information or does not match the parameters of your target person. If you haven't cleaned up your email list for a while, you may still be cold-emailed people who are already your customers.

3. Use chatbots on your website

Customers want to do business with companies that respond promptly to questions. Although companies respond within 12 hours on average, research shows that consumers expect responses within 1 hour. You might think, "Well, but they know we're not working right now," or, "They'll surely understand that we're in another realm of time." While customers can understand and understand later, there are thousands of businesses offering services just like yours, so you don't want to take that opportunity.

4. Join and participate in social media groups

LinkedIn and Facebook are great places to connect with other professionals, share your skills, and find leads. Once you join a group, don't start by pitching members as this can cause people to separate. Instead, do the following to establish a relationship:

  • Start a conversation
  • Engage in other people's conversations
  • People appreciated their content and the events they were planning to organize

Once the group members recognize you, you can use the platform to generate interest in your products.

5. Use SEO to increase website traffic

High ranking your website in search results will increase your website traffic. To get a better rank, you must do search engine optimization on your website. Some of the basics of SEO include:

  • Keyword optimization on both landing pages and blog content
  • Constantly great content post
  • Link building

Again, it is important to point out that SEO and content creation can be technical and time-consuming.

6. Create a sales funnel

Once you know who you are targeting and decide how to reach them, you need to have a plan to collect contact information. The first part of the process involves funneling all prospects into a standard form or landing page that encourages them to share their contact information, usually in exchange for a free gift, coupon, sample, or any other value-added incentive.

7. Use an email newsletter to build relationships

Now that you’re in touch with prospects, it’s time to cultivate those relationships so you can take them from the lead stage through sales (and ultimately repeat sales). One of the best ways to keep in touch with your prospects is through an email newsletter.

January 05, 20213 minutesauthorAnkit Kalathiya
post
Payments gateways are very useful components of any e-commerce store. One of the popular payment gateways is Stripe. it's becoming more popular nowadays. 

Stripe's simple definition is : 

We bring together everything that’s required to build websites and apps that accept payments and send payouts globally. Stripe’s products power payments for online and in-person retailers, subscription businesses, software platforms and marketplaces, and everything in between.  ~ Stripe

To begin this laravel tutorial, I hope you already have fresh laravel repo.

Stripe Configuration with Laravel

Run the following command to install stripe :

composer require stripe/stripe-php
if you don't have a Stripe account, you'll want to set that up and add your API keys. Add the following to your .env file.

STRIPE_KEY=your-stripe-key
STRIPE_SECRET=your-stripe-secret

Publish Migrations Files From Stripe

php artisan vendor:publish --tag="cashier-migrations" 

And Run migrations by hitting the following command

php artisan migrate 

Setup Stripe Controller

Now create a stripe controller by hitting the following command:

php artisan make:controller StripeController
namespace App\Http\Controllers;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Stripe\Checkout\Session;
use Stripe\Exception\ApiErrorException;
/**
 * Class FeaturedCompanySubscriptionController
 */
class StripeControlle extends AppBaseController
{
    public function createSession(Request $request)
    {
        setStripeApiKey();
        $session = Session::create([
            'payment_method_types' => ['card'],
            'customer_email'       => $userEmail,
            'line_items'           => [
                [
                    'price_data'  => [
                        'product_data' => [
                            'name' => 'Make '.$company->user->first_name.' as featured Company',
                        ],
                        'unit_amount'  => 100 * 100,
                        'currency'     => 'USD',
                    ],
                    'quantity'    => 1,
                    'description' => '',
                ],
            ],
            'client_reference_id'  => '1234',
            'mode'                 => 'payment',
            'success_url'          => url('payment-success').'?session_id={CHECKOUT_SESSION_ID}',
            'cancel_url'           => url('failed-payment?error=payment_cancelled'),
        ]);
        $result = [
            'sessionId' => $session['id'],
        ];
        return $this->sendResponse($result, 'Session created successfully.');
    }
    public function paymentSuccess(Request $request)
    {
        $sessionId = $request->get('session_id');
        // 
    }
   
    public function handleFailedPayment()
    {
        // 
    }
}

Define Routes

    Route::post('stripe-charge', 'StripeController@createSession');
    Route::get('payment-success', 'StripeController@paymentSuccess');
    Route::get('failed-payment',  'StripeController@handleFailedPayment');

Setup From View file


Here we are going to create stripe session from backend and redirect to stripe checkout page once we will receive the sessionId from backend.
Assume that makePaymentURL is something like "APP_URL/stripe-charge".
Now let's say when you hit the submit form of stripe it will call MakePaymentURL and that URL returns your session ID which we will use to redirect to the stripe checkout page. 

 $(document).on('click', '#makePayment', function () {
           
        $(this).addClass('disabled');
        $.post(makePaymentURL, payloadData).done((result) => {
            let sessionId = result.data.sessionId;
            stripe.redirectToCheckout({
                sessionId: sessionId,
            }).then(function (result) {
                $(this).html('Make Featured').removeClass('disabled');
                manageAjaxErrors(result);
            });
        }).catch(error => {
            $(this).html('Make Featured').removeClass('disabled');
            manageAjaxErrors(error);
        });
    });
That's it, after entering proper details into stripe you will get a success callback to a related route, where you can perform related actions. 
January 02, 20212 minutesauthorVishal Ribdiya
post

Basically, it works like a stack where each view is stacked on top of the other.

Create a drawable file for shadow view and assign the name image_shadow and add the below code in this file.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <corners android:radius="10dp" />
    <gradient
    android:angle="270"
    android:centerX="300%"
    android:endColor="#99000000"
    android:startColor="#00000000"
    android:type="linear" />
    <size
    android:width="270dp"
    android:height="60dp" />
    <stroke
    android:width="1dp"
    android:color="#878787" />
</shape>

Now, open xml file and add the below code into it, and set this drawable file as view background.

<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/imageView"
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:scaleType="centerCrop"
        android:src="@drawable/shopping_image"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>
    <View android:id="@+id/view"
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:background="@drawable/image_shadow"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>
    <androidx.appcompat.widget.AppCompatTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:textColor="@android:color/white"
        android:text="Write your text here"
        android:textSize="25sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="@+id/view"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>

That's it. You should be ready to go.

December 31, 20201 minuteauthorVivek Beladiya
post

Here we will learn, how to import annotations saved in the database using PDFTron.

In my last blog, we have learned how to save annotation in the database.

Events for import annotation

At the time of document load, we will get all annotations saved in the database using AJAX call and then we'll import that annotation. Now the question is if we import annotation than that will be drawn and again annotation changed event will fire and again annotation will be saved (as I say in my last blog), so this will become an infinite flow, but we can overcome this problem by checking if an annotation is imported or not. If an annotation is not imported then only we'll do save annotation in the database process otherwise we'll ignore it.\

When we draw any annotation "annotationChanged" event will be fired, and check if it is an imported annotation, then we can ignore it(eg, save annotation process).

Here is an example of how to import annotation from the database.

Example

WebViewer({
    path: 'path_to_the_PDFTron_'lib'_folder_on_your_server',
    css: 'webviewer_css',
    licenseKey: 'YOUR_PDF_TRON_LICENSE_KEY',
    initialDoc: 'YOUR_FILE URL' //url of a file to load
}, document.getElementById('viewer'))
    .then(function (instance) {
        let docViewer = instance.docViewer;
        let annotManager = instance.annotManager;
       
        annotManager.on('annotationChanged', (annots, action, e) => {
            //if annotation is imported we'll return
            if (e.imported) return;
            //when document will loaded we'll get annotations fro db
            docViewer.on('documentLoaded', function () {
                $.ajax({
                    url: `URL_TO_SAVE_ANNOTATION`,
                    type: 'GET',
                    success: function (result) {
                        if (result.success) {
                            result.data.forEach(annotationObj => {
                                annotManager.importAnnotations(annotationObj.annotation);
                            });
                        }
                    },
                    error: function (result) {
                        console.log(result);
                    }
                });
            });
        });
    });

December 28, 20201 minuteauthorMonika Vaghasiya
post

Simply put, the rule of 10 X is taking any target you set for your company or sales team, and multiplying it by 10.

So if the goal is to increase revenue by 5% using the 10X rule, you will increase that goal to 50%.

What the 10X rule does is force you and your sales team to think in terms of LEVERAGE. Because all of a sudden, instead of focusing on the “real” goal, the goal is achieved through the roof.

Contact customer acquisition with a solid plan. Build a foundation by developing relationships with your target audience.

Achieve customers differently as you progress toward strategic goals. Here are four lessons to guide your team:

1. Create an engagement

It is highly unlikely that a first time visitor will stumble upon your website and automatically purchase your products. Potential customers should be fully engaged with your brand before making a purchase.

2. Be present on social media

If you are not present on social media, you are lost in a huge market that your competitors are already taking advantage of.

Having a social media presence should also not be expensive. Creating a business account on Facebook, Twitter, Instagram, and LinkedIn is free. Just join discussions and groups related to your industry. Provide helpful answers to questions and insights on various posts to make yourself known.

3. Keep your sales simple

Everyone is on sale, even if your job or business has no impact, Cardo told those in attendance. And many entrepreneurs and professionals overreact to it.

Sales is a game of touch. It’s about finding someone who can buy, who has the power to make decisions, and who is interested. Then you contact them with offer fur, talk price, and ask. It's not always easy, though it's really easy. The most successful salespeople focus on simplifying their sales process.

4. Put your problem customers

We have it all - the customers that we meet today or in the future take up more of our time for business.

5. All your customers are committed to staying in touch after purchasing from you

Keep an eye out for ways you can sell them extra items. Don’t keep your customers engaged to monopolize your time, but you can help them gain an understanding of strategy opportunities.

6. Host an event

Hosting an event is a great way to do this because it gives potential customers the opportunity to meet your brand on a more personal level. Depending on your product or service, you can either host a personal event where customers can meet you or host an online webinar where it still feels personal - just like you are in front of your audience.

December 26, 20202 minutesauthorAnkit Kalathiya
post

Development:








The Balanced Scorecard (BSC) was originally developed by Robert Kaplan of Harvard University and Dr. David Northon as a framework for measuring organizational performance using the more " BALANCED " set of performance measures.

Traditionally companies used only short-term financial performance as a measure of success but now non-financial strategic measures also added in order to focus on long-term success.
The BSC system evolved over the years and is now considered a fully integrated "Strategic Management System".

What is a Balanced Scorecard (BSC)?








  • A Balanced Scorecard is a performance metric used to identify, improve, and control a business's various internal processes and resulting outcomes.
  • Balance Scorecard is a framework to implement and manage strategies.
  • The Balance scorecard is derived from the idea of looking at strategic measures to get a more balanced view of performance. The concept of a Balanced Scorecard evolved beyond the simple use of perspectives, every business can implement it according to the requirements and therefore it is a holistic system for managing strategy.

Why do we need to implement it?








  • The key benefit of using a BSC framework is that it gives way to the organization  to "Connect the Dots" between various components of strategic planning and management and it means there will be a visible connection between Projects and Programs that people are working on it.
  • BSC framework also helps management to meet pre-decided targets.

Perspectives of Balanced Scorecard:







Indeed balanced scorecard plays a significant role to aid management to keep updated internal processes and the external Business world as well.
The framework Balanced Scorecard divided into four areas (perspectives) that are critical to business success as given below.
balanced_scorecard_perspectives.png 223.33 KB
  1. Financial 
  2. Internal process 
  3. Learning and Growth 
  4. Customer 
The BSC suggests that we view the Organization from four Perspectives to develop Objectives, Measures, Targets, and initiatives (relative to each of these points of view).

To know more details about all four perspectives, read my upcoming weekly Blogs.

December 06, 20202 minutesauthorMariyam Bemat