Learnings Posts
How to integrate Zoom Meeting APIs with LaravelLaravel

How to integrate Zoom Meeting APIs with LaravelLaravel
Zoom Marketplace is providing APIs to create zoom meetings directly using the web interface and calling its API. So first of all you need to create your zoom ap into zoom marketplace and need to generate the API Keys and credentials.
Create a Zoom Application
- Go to Zoom marketplace and do sign in
- Click the Develop button on the header and select Build App menu.
- Choose the JWT and create an application with the app name that you want.
- Input required information and click Continue until your app will be activated.
I hope you already have installed fresh laravel.Now you have to add the following packages to your composer.json
to integrate the zoom API.
composer require firebase/php-jwt
composer require guzzlehttp/guzzle
And Now run composer update
And don't forget that we also need to modify .env
files to set the zoom API credentials.
ZOOM_API_URL="https://api.zoom.us/v2/"
ZOOM_API_KEY="INPUT_YOUR_ZOOM_API_KEY"
ZOOM_API_SECRET="INPUT_YOUR_ZOOM_API_SECRET"
can find the zoom credentials from your zoom app.
Now just copy the given ZoomMeetingTrait
to your controller and call-related methods.
namespace App\Traits;
use GuzzleHttp\Client;
use Log;
/**
* trait ZoomMeetingTrait
*/
trait ZoomMeetingTrait
{
public $client;
public $jwt;
public $headers;
public function __construct()
{
$this->client = new Client();
$this->jwt = $this->generateZoomToken();
$this->headers = [
'Authorization' => 'Bearer '.$this->jwt,
'Content-Type' => 'application/json',
'Accept' => 'application/json',
];
}
public function generateZoomToken()
{
$key = env('ZOOM_API_KEY', '');
$secret = env('ZOOM_API_SECRET', '');
$payload = [
'iss' => $key,
'exp' => strtotime('+1 minute'),
];
return \Firebase\JWT\JWT::encode($payload, $secret, 'HS256');
}
private function retrieveZoomUrl()
{
return env('ZOOM_API_URL', '');
}
public function toZoomTimeFormat(string $dateTime)
{
try {
$date = new \DateTime($dateTime);
return $date->format('Y-m-d\TH:i:s');
} catch (\Exception $e) {
Log::error('ZoomJWT->toZoomTimeFormat : '.$e->getMessage());
return '';
}
}
public function create($data)
{
$path = 'users/me/meetings';
$url = $this->retrieveZoomUrl();
$body = [
'headers' => $this->headers,
'body' => json_encode([
'topic' => $data['topic'],
'type' => self::MEETING_TYPE_SCHEDULE,
'start_time' => $this->toZoomTimeFormat($data['start_time']),
'duration' => $data['duration'],
'agenda' => (! empty($data['agenda'])) ? $data['agenda'] : null,
'timezone' => 'Asia/Kolkata',
'settings' => [
'host_video' => ($data['host_video'] == "1") ? true : false,
'participant_video' => ($data['participant_video'] == "1") ? true : false,
'waiting_room' => true,
],
]),
];
$response = $this->client->post($url.$path, $body);
return [
'success' => $response->getStatusCode() === 201,
'data' => json_decode($response->getBody(), true),
];
}
public function update($id, $data)
{
$path = 'meetings/'.$id;
$url = $this->retrieveZoomUrl();
$body = [
'headers' => $this->headers,
'body' => json_encode([
'topic' => $data['topic'],
'type' => self::MEETING_TYPE_SCHEDULE,
'start_time' => $this->toZoomTimeFormat($data['start_time']),
'duration' => $data['duration'],
'agenda' => (! empty($data['agenda'])) ? $data['agenda'] : null,
'timezone' => 'Asia/Kolkata',
'settings' => [
'host_video' => ($data['host_video'] == "1") ? true : false,
'participant_video' => ($data['participant_video'] == "1") ? true : false,
'waiting_room' => true,
],
]),
];
$response = $this->client->patch($url.$path, $body);
return [
'success' => $response->getStatusCode() === 204,
'data' => json_decode($response->getBody(), true),
];
}
public function get($id)
{
$path = 'meetings/'.$id;
$url = $this->retrieveZoomUrl();
$this->jwt = $this->generateZoomToken();
$body = [
'headers' => $this->headers,
'body' => json_encode([]),
];
$response = $this->client->get($url.$path, $body);
return [
'success' => $response->getStatusCode() === 204,
'data' => json_decode($response->getBody(), true),
];
}
/**
* @param string $id
*
* @return bool[]
*/
public function delete($id)
{
$path = 'meetings/'.$id;
$url = $this->retrieveZoomUrl();
$body = [
'headers' => $this->headers,
'body' => json_encode([]),
];
$response = $this->client->delete($url.$path, $body);
return [
'success' => $response->getStatusCode() === 204,
];
}
}
And add the following constants to your controller.
const MEETING_TYPE_INSTANT = 1;
const MEETING_TYPE_SCHEDULE = 2;
const MEETING_TYPE_RECURRING = 3;
const MEETING_TYPE_FIXED_RECURRING_FIXED = 8;
So the final controller will look like,
namespace App\Http\Controllers;
use App\Models\ZoomMeeting;
use App\Traits\ZoomMeetingTrait;
use Illuminate\Http\Request;
class MeetingController extends AppBaseController
{
use ZoomMeetingTrait;
const MEETING_TYPE_INSTANT = 1;
const MEETING_TYPE_SCHEDULE = 2;
const MEETING_TYPE_RECURRING = 3;
const MEETING_TYPE_FIXED_RECURRING_FIXED = 8;
public function show($id)
{
$meeting = $this->get($id);
return view('meetings.index', compact('meeting'));
}
public function store(Request $request)
{
$this->create($request->all());
return redirect()->route('meetings.index');
}
public function update($meeting, Request $request)
{
$this->update($meeting->zoom_meeting_id, $request->all());
return redirect()->route('meetings.index');
}
public function destroy(ZoomMeeting $meeting)
{
$this->delete($meeting->id);
return $this->sendSuccess('Meeting deleted successfully.');
}
}
So this is all you need to integrate the zoom API, so easy 😊 Right. Enjoy the code.
How to increase profit in our business - 1Sales

How to increase profit in our business - 1Sales
Introduction
1. Improve your website
- Explain who you are and what you sell
- Entice a potential customer to buy
- Make it easy to buy a product or service
- There is a way to easily contact sales or customer support with questions
2. Invest in your business
3. Increase your advertising
4. Raising prices
- How much does it cost you to make a product
- How much does it cost to deliver
- Costs for running a business - including administration and employee salaries
- Competitive price
- The last time you raised a price
Next, deliver this increase to customers. Explain why you came to this decision. If there’s any way to add value to a product without cutting a profit, do it and let customers know they’re getting more.
5. Follow the 80/20 rule
On the flip side, 20% of your customers frequently present 80% of your problems. Identify those problem-customers and fire them to free up your time on more positive business activities.
6. Cut costs
Check your current processes to reduce costs:
- Are there areas where you can improve efficiency?
- Negotiate cheap products or services?
- Will adopting new software or renting a service save you money in the long run?
How to explain the tricks to close your next dealSales

How to explain the tricks to close your next dealSales
Introduction
Let's review the persuasion strategy you can implement today to close your next deal.
1. Personalize your message
This doesn't mean you need to fully wing your sales calls, it does mean you need to be prepared to adjust your message based on what interests you in the potential.
2. Focus on problem-solving
3. Give social proof
While buyers may take your point as a sales representative with a grain of salt because they know you want to sell, they are more likely to trust a testimonial or story from a previous customer who was looking for a similar solution.
4. Assume goals
Then during a call, potentially throws out several turns, asking you questions and mentioning objections that you weren’t prepared to account for - the dream of every sales rip. But don't go too far. This is a valuable learning experience.
5. Empower empowerment decision making
6. Make personal connections
7. Don’t rush into the process
How To Grow Your Business - 2Sales

How To Grow Your Business - 2Sales
Here is part one of How To Grow Your Business - 1
Introduction
You can only develop products and services that are very effective if you pay attention to the needs of your customers and prospects. One way to understand exactly what your customers want is through research and surveys.
8. Create a sales funnel
The first way to grow your business faster is by creating a sales funnel. If you do not have a sales funnel, you are making a big mistake. Sales funnels can help automate your business.
It helps you grow and grow quickly and easily. Sure, there are some front-end functions involved. Is natural. But, once those processes are suspended, they will travel easily from there.
9. Use a customer management system
Manually tracking transactions is difficult. No one wants to do that. It becomes a burden as the business grows. If you want to scale quickly, use a customer management system.
10. Competition research
When going to the market, and you are really looking to get your offer out to the public, you need to research the competition. Frasier says he uses two platforms to do his own research. The first is the same web.
11. Create a customer loyalty program
Loyalty programs are the best way to increase sales. It costs three times more to acquire new customers than to sell something to an existing customer.
Other resources pin this number anywhere from four to 10 times more. However, whichever way you cut it, getting new customers is expensive.
12. Identify new opportunities
Analyze new opportunities in your business by better understanding your demographics. Understand everything from distribution channels to your direct competitors, and also analyze overseas markets and other potential industries.
With the right amount of potential analysis, you are likely to immediately pursue dozens of new opportunities.
13. Create an email list
One of the best and most effective ways to grow a business quickly is to create an email list. Clearly, that means you need to have a lead magnet.
14. Think of the franchise model.
If you have a successful business, and you are trying to grow really fast, consider franchising it. Although franchise costs are high and moving towards a franchise model is complex and it takes a lot in marketing, how can it all make a difference if you are looking for really fast growth.
Employee Morale: Play significant role in Business DevelopmentHuman Resource

Employee Morale: Play significant role in Business DevelopmentHuman Resource
After doing all the right things to boost productivity and still employees' productivity plunging or not increasing, we need to look at the Employee Morale. Employee Morale is a decisive factor in an Organisation whether it is the Service sector or Manufacturing unit. It is one of the cornerstones of the business, only a few organizations pay attention to morale among employees in their organization and this is the major mistake from their side as it affects productivity which ultimately reflects in Organizational Growth & Productivity.
Let’s Discuss:
- What’s Employee Morale?
- Characteristics of Employee Morale.
- Relation between Morale & Productivity.
What is Employee Morale?
In simple terms employee morale is the standard of behavior of an employee which directly affects the productivity of the organization but it is a complex concept as there are ample factors that affect employee morale.
Definition:
Edwin Flippo: “ Morale is a mental condition or attitude of individual and groups which determines their willingness to cooperate”
Characteristics:
- Psychological concept
- Dynamic Nature
- Group phenomenon
- Reflect others
Psychological Concept:
Morale is a psychological phenomenon, it is the internal feeling of confidence, attitude, Zest, enthusiasm, satisfaction, etc. Moreover, it is the state of mind and emotions affecting the attitude and willingness to work that affect individual and organizational objectives.
Dynamic Nature:
Morale is Dynamic in nature; we cannot develop it overnight. Management has to make continuous efforts to build and maintain high morale among employees in the organization. It is a long-term concept.
Group Phenomenon:
Morale is not an individual phenomenon but it's the sum of the total employee’s attitude, feelings, and sentiments.
Reflect others:
We cannot measure morale directly but it is reflected in productivity, discipline, turnover, etc. To measure morale we need to look at other factors.
Relations between Morale and Productivity:
Davis Designed that there is not always a positive link between Productivity and Employee morale. There can be four combinations of Morale and Productivity
1. High morale-High productivity
This situation is likely to occur when the employees are fully motivated to achieve high performance not only this but satisfied with all financial & nonfinancial rewards & highly satisfied with their job role. Feeling proud to be part of the organization/team.
2. High morale-low productivity
This situation occurs when the employees waste their time in the workplace or use the time to satisfy their personal goals. They don't care about organizational goals. There are many factors responsible for this kind of Employee Attitude in the workplace such as
- Lack of proper training,
- Lack of support by co-workers or leaders,
- Leaders/Superior behavior with him,
- Irresponsible Management (If we talk about It or another small service sector Irresponsible HR )
- Ineffective Supervision
- Restrictive norms of the informal group
- Outdated Technology & Methods
3.Low morale-High productivity
In a short period, it may be possible that with low morale Employee's productivity seems high but it is for a temporary or short span of time. Low Morale can not result in high productivity for a long time. this situation occurs when
- Fear of losing a job,
- Less availability of alternatives
- Strict Supervision, Rules & Regulations
- Punishment
- Policies and strategies focus on high productivity only.
4. Low morale-Low productivity
This situation occurs when the organizational & individual goals are not satisfied & other factors like
- Lack of motivation
- Unclear Job role
- Lack of harmonious Superior-Subordinate relationship
These all factors result in frustration, tension and grievances develop against managers which reflect low productivity. To pen down, morale is the paramount factor that gives a direct impact on productivity, Productivity impact on profitability, profitability impact on organizational growth. If the Morale is high then it will be possible to gain more fruits in the future but if it's low then it's Red Signal for any organization even the productivity is high but it will be for a short period of time only
I am not going to end the topic of Morale but will continue in the next blog with
- Factor determining morale
- Significance of high morale
- Impact of low morale
- Measurement of morale
To know about these please read my upcoming blogs of Human Resource…..
Software Testing TechnologyTesting

Software Testing TechnologyTesting
Software testing is a process of checking and validating the functionality of an application to determine if it meets specified requirements. It is about finding application faults and verifying where the application is operating according to the end-user needs.
Important Software Testing Techniques:-
- Boundary Value Analysis (BVA)
- Equivalence Class Partitioning
- Decision Table based testing.
- State Transition
- Error Guessing
- Boundary Value Analysis (BVA)
-
The marginal cost assessment is based entirely on trying the boundaries between partitions. It includes maximum, minimum, internal, or external barriers, typical values, and error values. It is generally seen that numerous errors occur at the obstacles of the defined input values as opposed to the center.
- It is also known as BVA and offers a selection of test entities that train limit values. This black container test method improves equivalence partitioning. This software program trying one approach is based on the principle that if a machine works well for these exact values, it will paint error-free for all values that are between the two limits.
Let's see one example:
Input condition is valid between 1 and 10 Boundary values 0,1,2 and 9,10,11
Equivalence Class Partitioning
The equal class phase lets you divide a hard and fast check state into separate sections which are taken into consideration identical. The equal class division software program test technique breaks the input area of a program into a class of information, so a test case has to be designed.
Let’s see one example:
Input conditions are valid between
1 to 10 and 20 to 30
Hence, there are five equivalence classes
--- to 0 (invalid)
1 to 10 (valid)
11 to 19 (invalid)
20 to 30 (valid)
31 to --- (invalid)
You select values from each class, i.e.,
-2, 3, 15, 25, 45
Decision Table Based Testing
The decision table is known as the cause and effect table. This testing technique is suitable for input features that have a logical relationship between inputs. In this technique, combinations of inputs are processed. In order to identify the test case with the decision table, it is necessary to consider the terms, actions, and procedures. Conditions are taken as input and actions as output.
Testing Using The Decision Table In The Login Form
CONDITIONS - CASE 1, CASE 2, CASE 3, CASE 4
| EMAIL | F | T | F | T | PASSWORD | F | F | T | T | OUTPUT | ERROR | ERROR | ERROR | HOME SCREEN
CASE 1: Email And Password Wrong: Error Message Displayed.
CASE 2: Email True And Password Wrong, Error Message Displayed.
CASE 3: Email Wrong And Password True, Error Message Displayed.
CASE 4: Email And Password True, Redirect to Home screen
State Transition Testing Technique
In-State Transition technique changes in input conditions change the state of the Application Under Test (AUT). This testing technique allows the tester to test the behavior of an AUT. The tester can perform this action by entering various input conditions in a sequence. In-State transition technique, the testing team provides positive as well as negative input test values for evaluating the system behavior.
Presently We Make A Diagram For Forgot Password/OTP Proces
- First Enter the Right Number In This Text Box and Click RESET PASSWORD Button. One OTP Comes On Mobile Number.
- To reset the secret word you should experience the "OTP'' framework. The first run-through the client enters is "OTP '', they will be permitted to go to the secret phrase change page.
- In the event that the client enters mistaken "OTP '' unexpectedly and second, the framework will request the third time "OTP'' is entered.
- In the event that "OTP'' is valid, it will be permitted to go to the secret phrase change page, in any case, if the OTP is off base the third time, an Error Message Displayed Like "Your OTP has expired!!".
State Transition Table
ATTEMPT CORRECT PIN INCORRECT PIN
| [B1] Start | B5 | B2
| [B2] First attempt | B5 | B3
| [B3] Second attempt | B5 | B4
| [B4] third attempt | B5 | B4
| [B5] Access granted | - | -
| [B6] Account blocked | - | -
Error Guessing Technique
Error guessing is a software testing technique based on guessing the error that can appear in the code. The technique relies heavily on experience, with the test analysts using their experience to guess the problematic part of the test application. Therefore, test analysts need to be competent and experienced in order to better guess errors. The technique counts a list of possible errors or error-prone situations. Then the tester writes a test case to uncover these errors. To design test cases based on this software testing technique, the analyst can use the experience to identify the conditions.
This technique can be used at any level of testing and for testing the common mistakes like:
- Divide by zero
- Inserting blanks in text fields
- Pressing the enter button without entering values
- Uploading files that exceed the maximum limits
- Exception null pointer.
- Invalid parameters
Let’s see one example:
Suppose there is a requirement that the phone number be numeric and not less than 10 characters. And the software application has a phone number.
The following are the error estimation techniques:
- What will be the result if the cellphone number is left blank?
- What is the result if a character other than a digit is entered?
- What is the result if fewer than 10 digits are entered?
How to Delete Record using ajax call with LaravelLaravel

How to Delete Record using ajax call with LaravelLaravel
We work on projects with the admin panel every day. In which we mostly use data tables and we need to delete the record from the data table without page refresh.
So, today I will show you how to extract a record using Ajax. It's very easy to integrate.
Let's take one example. I have a Category data table and I want to delete one category from the table without refreshing the page. Now, what am I doing for that? First of all, I add a class for the listen to a click event into the delete button and it says delete-btn.
See the following image for where I added a class.
I used SweetAlert for the confirmation popup. let add sweet alert's CSN into the index.blade.php.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
Let's declare routes of the delete record.
<script>let categoryUrl = '{{route('categories.index')}}'; </script>
Next steps, I'm going to listen to the click event of the delete button. one more thing does not forget to add the record id into the data attribute to the delete button. see the above image for it. I highlighted it with a yellow line.
So the general practices we use in Laravel is to write the following code to listen to a click event and delete a record,
$(document).on('click', '.delete-btn', function (event) {
const id = $(event.currentTarget).data('id');
swal({
title: 'Delete !',
text: 'Are you sure you want to delete this Category" ?',
type: 'warning',
showCancelButton: true,
closeOnConfirm: false,
showLoaderOnConfirm: true,
confirmButtonColor: '#5cb85c',
cancelButtonColor: '#d33',
cancelButtonText: 'No',
confirmButtonText: 'Yes', },
function () {
$.ajax({
url: categoryUrl + '/' + id,
type: 'DELETE',
DataType: 'json',
data:{"_token": "{{ csrf_token() }}"},
success: function(response){
swal({
title: 'Deleted!',
text: 'Category has been deleted.',
type: 'success',
timer: 2000,
});
$('#categoryTbl').DataTable().ajax.reload(null, false);
},
error: function(error){
swal({
title: 'Error!',
text: error.responseJSON.message,
type: 'error',
timer: 5000,
})
}
});
});
});
Now we are done with the front-end side and need to look into it backend side.
Let's declare the destroy method into the category Controller. I hope are you generating crud with InfyOm Laravel Generator. so, the Destroy method and routes are there. If not please create a route. if the destroy method is there then need to change the response of that method.
The destroy method code looks like,
public function destroy($id) {
$category = $this->categoryRepository->find($id);
if (empty($category)) {
Flash::error('Category not found');
return $this->sendError('Category not found.');
}
$this->categoryRepository->delete($id);
return $this->sendSuccess('Category deleted successfully.');
}
How to Keep Your Customers Happy & Increase Repeat Project - 2Sales

How to Keep Your Customers Happy & Increase Repeat Project - 2Sales
Here is part one of How to Keep Your Customers Happy & Increase Repeat Project
9. Know your products and services
Customers want to work with knowledgeable employees. Learn all you can about your products so you can be better equipped to answer customer questions. If you are unsure about something, ask for help.
10. Treat your customers individually
Not all customers are the same. Every customer has individual needs and concerns and they want to be treated with a personal touch that doesn’t make them feel like a number. Communicate the way your customers want to communicate.
11. Make it easy for your customers to complain
Your customers seem to have heard, especially when they are frustrated with the service they have received. Customers know what they like and at least about your service. Ongoing surveys are a reliable and consistent approach to getting feedback but don’t miss the opportunity when you’re with a customer. Just asking you sends a beautiful message about how you value your customers and their feedback.
12. Thank your customers for every opportunity you get
Thank you very much for your customers. Thank you for calling, bringing payment, meeting you at their home, calling for help, and yes, calling for a complaint! For many, there are options available and they chose your company over the competition.
13. Never accept your customers
Your customers are your business!
14. To be active
Don't wait for your client to reach you. Reach out to them in more than one way. Improving the first call resolution cases of the customer problem will improve the overall customer experience. Create a complete self-help interface, in which customers can solve their problems manually.
15. I will take responsibility
Tell your customer that you understand that you have a responsibility to ensure a satisfactory outcome of the transaction. Assure the customer that you know what she expects and will deliver the product or service at the agreed price. There will be no unexpected charges or costs to solve the problem.