Evil  David

Evil David

1605553200

From Zero to Confident API Dev using JWT and Laravel

Howdy, Are you a Laravel dev? Or learning Laravel in deep? Then you must hear the term API, right? API (Application Programming Interface) is a very common thing nowadays in the world of software development. Modern web applications can’t think of it. It’s a great medium for data sharing and data authenticity. If you are/want to be a backend developer, learning to integrate API is a must. But how to make them?

As API is an intermediate level concept, I am assuming you are pretty familiar with  PHP and  Object-Oriented Programming (OOP),  Composer and you build/started building pieces of stuff using  Laravel. If you’re not familiar with them I highly recommend you to learn them first. For a clear understanding, I broke down this tutorial into two parts. In this part, I will discuss the concept/methodology behind API building and JWT. And in the part 2, I will implement them using JWT and Laravel. If you have a basic concept of them, you can skip this part and move on to the next part.

So what is API?

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message or check the weather on your phone, you’re using an API. It’s a way of data communication. It lets you share/store/validate data from your application to other applications and vice versa. If you want to share some data publicly/privately to some other application, will you let them modify/access your database? Of course, not, there comes the vital role of API. You can share an endpoint to others where they can store/retrieve data with proper validation and authentication.

Before we dive deep, let’s clear some core concepts and processes to _authenticate _a user using API. So now comes the question, what is authentication? I often see people get confused between authorization and authentication.

_Let’s imagine a scenario. You joined/work in an IT company. Whenever you try to enter your office you need to pass the main gate of the building and a guard sitting there asks your identity so that he can be sure that you belong to this office. You somehow(showing you ID card/finger punch) managed to prove your identity and get inside the office building. Now you got a cabin/desk of your own and went there started working. After some time you thought to take a coffee break and went to the canteen/food court of your office. After that, you wanted to look at the server room of the IT department and you got stopped and asked to __verify _yourself once again as the room is only open for a few people. As you don’t have access there, you returned to your desk and started working again.

#laravel #jwt #api #authentication #php

What is GEEK

Buddha Community

From Zero to Confident API Dev using JWT and Laravel

I am Developer

1595240610

Laravel 7 File Upload Via API Example From Scratch

Laravel 7 file/image upload via API using postman example tutorial. Here, you will learn how to upload files/images via API using postman in laravel app.

As well as you can upload images via API using postman in laravel apps and also you can upload images via api using ajax in laravel apps.

If you work with laravel apis and want to upload files or images using postman or ajax. And also want to validate files or images before uploading to server via API or ajax in laravel.

So this tutorial will guide you step by step on how to upload file vie API using postman and ajax in laravel with validation.

Laravel Image Upload Via API Using Postman Example

File

Follow the below given following steps and upload file vie apis using postman with validation in laravel apps:

  • Step 1: Install Laravel New App
  • Step 2: Add Database Credentials
  • Step 3: Generate Migration & Model
  • Step 4: Create Routes For File
  • Step 5: Generate Controller by Artisan
  • Step 6: Run Development Server
  • Step 7: Laravel Upload File Via Api Using PostMan

Checkout Full Article here https://www.tutsmake.com/laravel-file-upload-via-api-example-from-scratch/

#uploading files via laravel api #laravel file upload api using postman #laravel image upload via api #upload image using laravel api #image upload api in laravel validation #laravel send file to api

Seamus  Quitzon

Seamus Quitzon

1595201363

Php how to delete multiple rows through checkbox using ajax in laravel

First thing, we will need a table and i am creating products table for this example. So run the following query to create table.

CREATE TABLE `products` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
 `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Next, we will need to insert some dummy records in this table that will be deleted.

INSERT INTO `products` (`name`, `description`) VALUES

('Test product 1', 'Product description example1'),

('Test product 2', 'Product description example2'),

('Test product 3', 'Product description example3'),

('Test product 4', 'Product description example4'),

('Test product 5', 'Product description example5');

Now we are redy to create a model corresponding to this products table. Here we will create Product model. So let’s create a model file Product.php file under app directory and put the code below.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    protected $fillable = [
        'name','description'
    ];
}

Step 2: Create Route

Now, in this second step we will create some routes to handle the request for this example. So opeen routes/web.php file and copy the routes as given below.

routes/web.php

Route::get('product', 'ProductController@index');
Route::delete('product/{id}', ['as'=>'product.destroy','uses'=>'ProductController@destroy']);
Route::delete('delete-multiple-product', ['as'=>'product.multiple-delete','uses'=>'ProductController@deleteMultiple']);

#laravel #delete multiple rows in laravel using ajax #laravel ajax delete #laravel ajax multiple checkbox delete #laravel delete multiple rows #laravel delete records using ajax #laravel multiple checkbox delete rows #laravel multiple delete

I am Developer

1602036957

Laravel 8 REST API Authentication with Passport Example Tutorial

Laravel 8 rest api authentication with passport tutorial, you will learn step by step how to create rest API with laravel 8 passport authentication. And as well as how to install and cofigure passport auth in laravel 8 app.

Laravel 8 API Authentication with Passport Tutorial

Step 1: Download Laravel 8 App
Step 2: Database Configuration
Step 3: Install Passport Auth
Step 4: Passport Configuration
Step 5: Run Migration
Step 6: Create APIs Route
Step 7: Create Passport Auth Controller
Step 8: Now Test Laravel REST API in Postman

https://www.tutsmake.com/laravel-8-rest-api-authentication-with-passport/

#laravel api authentication with passport #laravel 8 api authentication #laravel 8 api authentication token tutorial #laravel 8 api authentication using passport #laravel 8 api authentication session

Evil  David

Evil David

1605553200

From Zero to Confident API Dev using JWT and Laravel

Howdy, Are you a Laravel dev? Or learning Laravel in deep? Then you must hear the term API, right? API (Application Programming Interface) is a very common thing nowadays in the world of software development. Modern web applications can’t think of it. It’s a great medium for data sharing and data authenticity. If you are/want to be a backend developer, learning to integrate API is a must. But how to make them?

As API is an intermediate level concept, I am assuming you are pretty familiar with  PHP and  Object-Oriented Programming (OOP),  Composer and you build/started building pieces of stuff using  Laravel. If you’re not familiar with them I highly recommend you to learn them first. For a clear understanding, I broke down this tutorial into two parts. In this part, I will discuss the concept/methodology behind API building and JWT. And in the part 2, I will implement them using JWT and Laravel. If you have a basic concept of them, you can skip this part and move on to the next part.

So what is API?

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message or check the weather on your phone, you’re using an API. It’s a way of data communication. It lets you share/store/validate data from your application to other applications and vice versa. If you want to share some data publicly/privately to some other application, will you let them modify/access your database? Of course, not, there comes the vital role of API. You can share an endpoint to others where they can store/retrieve data with proper validation and authentication.

Before we dive deep, let’s clear some core concepts and processes to _authenticate _a user using API. So now comes the question, what is authentication? I often see people get confused between authorization and authentication.

_Let’s imagine a scenario. You joined/work in an IT company. Whenever you try to enter your office you need to pass the main gate of the building and a guard sitting there asks your identity so that he can be sure that you belong to this office. You somehow(showing you ID card/finger punch) managed to prove your identity and get inside the office building. Now you got a cabin/desk of your own and went there started working. After some time you thought to take a coffee break and went to the canteen/food court of your office. After that, you wanted to look at the server room of the IT department and you got stopped and asked to __verify _yourself once again as the room is only open for a few people. As you don’t have access there, you returned to your desk and started working again.

#laravel #jwt #api #authentication #php

Sival Alethea

Sival Alethea

1624302000

APIs for Beginners - How to use an API (Full Course / Tutorial)

What is an API? Learn all about APIs (Application Programming Interfaces) in this full tutorial for beginners. You will learn what APIs do, why APIs exist, and the many benefits of APIs. APIs are used all the time in programming and web development so it is important to understand how to use them.

You will also get hands-on experience with a few popular web APIs. As long as you know the absolute basics of coding and the web, you’ll have no problem following along.
⭐️ Unit 1 - What is an API
⌨️ Video 1 - Welcome (0:00:00)
⌨️ Video 2 - Defining Interface (0:03:57)
⌨️ Video 3 - Defining API (0:07:51)
⌨️ Video 4 - Remote APIs (0:12:55)
⌨️ Video 5 - How the web works (0:17:04)
⌨️ Video 6 - RESTful API Constraint Scavenger Hunt (0:22:00)

⭐️ Unit 2 - Exploring APIs
⌨️ Video 1 - Exploring an API online (0:27:36)
⌨️ Video 2 - Using an API from the command line (0:44:30)
⌨️ Video 3 - Using Postman to explore APIs (0:53:56)
⌨️ Video 4 - Please please Mr. Postman (1:03:33)
⌨️ Video 5 - Using Helper Libraries (JavaScript) (1:14:41)
⌨️ Video 6 - Using Helper Libraries (Python) (1:24:40)

⭐️ Unit 3 - Using APIs
⌨️ Video 1 - Introducing the project (1:34:18)
⌨️ Video 2 - Flask app (1:36:07)
⌨️ Video 3 - Dealing with API Limits (1:50:00)
⌨️ Video 4 - JavaScript Single Page Application (1:54:27)
⌨️ Video 5 - Moar JavaScript and Recap (2:07:53)
⌨️ Video 6 - Review (2:18:03)
📺 The video in this post was made by freeCodeCamp.org
The origin of the article: https://www.youtube.com/watch?v=GZvSYJDk-us&list=PLWKjhJtqVAblfum5WiQblKPwIbqYXkDoC&index=5
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!

#apis #apis for beginners #how to use an api #apis for beginners - how to use an api #application programming interfaces #learn all about apis