teleren/devto huggingface dataset:
Laravel 9 Follow Unfollow Example Using Ajax Request
Tags: laravel
Published: 2022-03-21 14:47:34

Today I have a special tutorial for you developer, I would like to share with you how to implement a follow and unfollow system with PHP Laravel and MySQLi like Twitter and Facebook. So basically, a user can follow unfollow another user and you can see which users following you and how many followers you have.

So, in this post. I will explain you step by step create follow system in laravel 5, laravel 6, laravel 7, laravel 8 and laravel 9 application. we will use "overture/laravel-follow" composer package for following a system. we will create users table and user authentication using laravel auth. then a user can log in and see how many he has followers and following you.

Just follow a few step and you will get layout like as bellow preview and also you can download script from bellow link.

[Laravel 9 Follow Unfollow Example Using Ajax Request](https://www.codecheef.org/article/laravel-9-follow-unfollow-example-using-ajax-request)
Creating a Proxy for your GraphQL Server
Tags: graphql, node, tutorial
Published: 2022-03-21 14:39:40

I needed to create a proxy server for my GraphQL service to be able to make some decisions before reaching my service.

This article will document how you can do the same with minimal amount of code 😏
We'll be leveraging awesome utilities provided by [graphql-tools](https://www.graphql-tools.com/)

## Installation

```bash
npm init -y
npm i @graphql-tools/delegate @graphql-tools/utils @graphql-tools/wrap apollo-server cross-undici-fetch graphql typescript
```

## Create an [executor](https://www.graphql-tools.com/docs/remote-schemas#creating-an-executor) 

Executor is a function used capable of retrieving GraphQL results (both introspection & fetching results during a query's execution).

In the executor, I've defined the GraphQL service's URL which I want to proxy - https://graphql.anilist.co/ (an open API to fetch your favourite Anime characters)

```typescript
const executor =  async ({ document , variables, context }: {document: any, variables: any, context: any}) => {
    const query = print(document)
  const fetchResult = await fetch('https://graphql.anilist.co/', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      ...context?.headers
    },
    body: JSON.stringify({ query, variables })
  })
  return fetchResult.json()
}
```

Define applicationProxyResolver

This function is passed to `wrapSchema` method. In this method, you should be able to make some decisions. For example - I wanted to validate some headers & only honour the requests if they had these headers. We'll use `delegateToSchema` to delegate the entire request to our original GraphQL service.

```typescript
export const applicationProxyResolver = ({
    subschemaConfig,
    operation,
    transformedSchema,
}: {
    subschemaConfig: any,
    operation: any,
    transformedSchema: any,
}) => {
    return (_parent: any, _args: any, context: any, info: any) => {
        return delegate.delegateToSchema({
            schema: subschemaConfig,
            operation,
            operationName: info!.operation!.name!.value,
            context,
            info,
            transformedSchema,
        });
    };
}
```

Let's fire up the graphQL proxy server 🚀

```typescript
const init = async () => {
    const schema = wrapSchema({
        schema: await introspectSchema(executor),
        executor,
        createProxyingResolver: applicationProxyResolver
    });
    
    const server = new ApolloServer({ 
        schema,
    });
    
    // The `listen` method launches a web server.
    server.listen(4001).then(({ url }) => {
        console.log(`🚀  Server ready at ${url}`);
    });
    
}

init();
```

![Proxy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nhs45egq84jkqutfww8a.png)
 

You can find this code at [Github](https://github.com/harshitkumar31/graphql-proxy).

Is there an easier way to do this? Please comment & let me know 😁
A Couple of GitHub CLI Aliases
Tags: github, cli
Published: 2022-03-21 14:29:49

One thing I love about [GitHub CLI](https://cli.github.com/) is that it's easy to define aliases. You can run `gh alias set ...` to define a new alias and add all sorts of useful commands. Here are two that I use every day:

```
gh alias set w 'run watch'
```

I type `gh run watch` constantly, so shortening it to `gh w` is very handy.

```
gh alias set merge 'pr merge -d'
```

This one makes it where typing `gh merge` will merge the pr for the current branch, delete the branch on the remote and locally, and switch you back to your main branch.

---

It's always handy to save a few keystrokes. Define some aliases of your own and share them here in the comments!
Updated format testing (uat testing)
Tags: uat
Published: 2022-03-21 14:29:25

# Steps to integrate Razorpay 

Update feature testing after updating blog structure.

* Setting up Razorpay account.

* Storing API keys in settings.py

* Installing Razorpay library.

* Creating order using Razorpay API.

* Creating order at backend and also creating Razorpay order.

	* Show template

	* render to payment.html

	* Get info of call back URL

	* Done with creating an order.

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

[https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea](https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpwz0vil4j.png)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpje031c1t.png)

💡 Testing call out block
Updated blog testing for update feature
Tags: testing
Published: 2022-03-21 14:28:24

# Steps to integrate Razorpay 

* Setting up Razorpay account.

* Storing API keys in settings.py

* Installing Razorpay library.

* Creating order using Razorpay API.

* Creating order at backend and also creating Razorpay order.

	* Show template

	* render to payment.html

	* Get info of call back URL

	* Done with creating an order.

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

{% gist https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea %}

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmp3pywtx3s.png)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmp_bolx_yr.png)

💡 Testing call out block
Custodial vs. Non-Custodial Wallets: Understanding the Difference
Tags: mobileappdevelopment, walletappdevelopment
Published: 2022-03-21 14:25:22

## **What is a Custodial Wallet?

**
A Custodial Wallet is defined as a wallet in which the private keys are held by a third party. Meaning, the third party has full control over your funds while you only have to give permission to send or receive payments.

## **What is a Non-Custodial Wallet?

**
It is a type of Blockchain wallet that lets you be your own bank. This implies that users have full control over their funds and on the associated private key. If you want to know more about blockchain wallets, you can read here.

## Custodial Vs Non-Custodial Wallet

**1. Custodian of private key
**
The foremost factor to consider when comparing the Custodial vs non-custodial wallets is who holds the private key.

In case of Custodial wallets, the third party manages the private key. Whereas, in the case of Non-Custodial wallets, all the blockchain custodian services reside with users.

So, in case you want to introduce a wallet where users can be their own bank, go with the idea of creating non-Custodial blockchain wallets.

**2. Transaction type
**
Another factor to consider during Custodial and Non-Custodial crypto wallet comparison is the transaction type.

The transaction is reflected on the chain in real-time in Non-Custodial. But, it is not so in the case of Custodial wallet.

This again shows that the former leads the show.

**3. Security
**
In the case of custodial online crypto wallets, all the sensitive user data is stored in hot and cold storage, which are often hacked by data intruders. Because of this, the security level is low in custodial, unless the authoritative party implements strong security measures.

Whereas, in case of Non-Custodial crypto wallet comparison, the whole information remains with users. This reduces the risk of data being stolen, unless the user shares the details with someone, or their device gets stolen.

So, here again, Non-Custodial wins the [Custodial vs Non-Custodial wallet](https://appinventiv.com/blog/custodial-vs-non-custodial-wallets/) battle.

**4. Backup and recovery possibility
**
When it comes to backup and recovery possibilities, non-Custodial crypto wallets lag behind the Custodial one.

The Custodial wallets keep the private key with themselves. So, even if you lose the access to data, you can regain the access by requesting the third party.

However, this is not possible in the case of Non-Custodial wallets where you are the sole authority.

Several industries across different domains are getting their own crypto wallet app by getting [mobile application development services](https://appinventiv.com/) from an experienced company.
Updated blog testing
Tags: testing
Published: 2022-03-21 14:23:51

# Steps to integrate Razorpay 

* Setting up Razorpay account.

* Storing API keys in settings.py

* Installing Razorpay library.

* Creating order using Razorpay API.

* Creating order at backend and also creating Razorpay order.

	* Show template

	* render to payment.html

	* Get info of call back URL

	* Done with creating an order.

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

{% gist https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea %}

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpe9gt9aqg.png)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpzkq_d8pd.png)

💡 Testing call out block
Laravel Auth Example | Laravel 9 Authentication Example
Tags: laravel
Published: 2022-03-21 14:22:54

In this quick example, let's see laravel 9 auth with breeze. We will use laravel 9 authentication using breeze tutorial. we will help you to give an example of laravel 9 breeze with vue js. I would like to share with you laravel 9 breeze with react.

Laravel Breeze provides simple authentication features including login, registration, password reset, email verification, and password confirmation. Breeze powered by Blade and Tailwind. Laravel breeze gives you the ability to create authentication scaffolding with vue and react.

If, you want to see how to install breeze in laravel 9 then just follow below step and see.

[Laravel Auth Example | Laravel 9 Authentication Example](https://www.codecheef.org/article/laravel-auth-example-laravel-9-authentication-example)
Laravel 9 Custom Login and Registration Example
Tags: laravel
Published: 2022-03-21 14:20:31

I am going to show you example of laravel custom login and registration example. it's simple example of laravel custom login authentication. we will help you to give example of laravel custom login and registration. Here you will learn laravel custom registration and login.

Laravel provide auth using jetstream and ui package. but sometime we need to create our own login, registration, dashboard and logout then i will help you how to create step by step custom login and registration page in laravel application. you can easily create custom login and registration with laravel 6, laravel 7, laravel 8 and laravel 9 version.

[Laravel 9 Custom Login and Registration Example](https://www.codecheef.org/article/laravel-9-custom-login-and-registration-example)
What the Heck is DevOps?
Tags: programming, meetup
Published: 2022-03-21 14:19:22


April 12, 2022, our own Daniel Davis will be giving his talk "What the Heck is DevOps?"  Details here: [https://www.meetup.com/Detroit-Tech-Watch/events/283821426/](https://www.meetup.com/Detroit-Tech-Watch/events/283821426/)

Thinking to yourself "Is DevOps yet another buzzword?  What does it really mean?" Here's your chance to find out!

This meetup is virtual and open to anyone who cares to attend!
How to approach user specific rendering with turbo streams
Tags: rails, turbo, hotwire, turbostream
Published: 2022-03-21 14:12:38

So I have an issue, I want to render current_user specific partials to my turbo stream. In my use case I have an instant messaging app, and when a user writes a new message I would like to broadcast that message to all the users within that chat. My issue is that message partial has user specific buttons with user specific permissions in it, aka edit and delete, which should only be accessible to the message creator and admin users. The issue I run into is that when broadcasting a partial to a stream I don't know how to attribute the current_user variable (using devise) within that partial to the user being broadcast to. At the moment I have a hacked solution using a stimulus connect() callback, but it is my no means ideal. Can anyone help me out? I am sure there must be a more sophisticated and simpler way of doing this that doesn't involve every user receiving the message to trigger there own request.

Any help would be greatly appreciated,

Thanks, Lenny
A bug about vite
Published: 2022-03-21 14:02:48

When I use vite, its speed makes me feel fun in the development. However, a new problem has plagued me for a long time. When developing H5 pages, I have to use mobile phones for debugging, so intranet penetration is an inevitable means. However, after intranet penetration, the pages are not refreshing very much, and the same problem also appears at the beginning of the computer. I add
`vite.config.js`
`host: "0.0.0.0"` 
`hmr: {
      protocol: "ws",
      host: "127.0.0.1",
    }
`
Although it has been solved on the computer side, the same problem still exists when debugging with the mobile phone,
Who has encountered the same problems and solved them like me? I hope you can share your methods. I will thank you very much
Svelte and TypeScript - Guide
Tags: svelte, typescript, productivity, tutorial
Published: 2022-03-21 13:55:44

Ever asked if `Svelte` could be used for business applications? Have you ever wanted to write `TypeScript` inside your `Svelte` and `SvelteKit` applications? Ever struggled to get started?

Then you will finally get an answer here.

## Why should you care about TypeScript?

`JavaScript` does not have a static type system, so we need `TypeScript` to benefit from the capabilities that types can provide:
 - common error prevention
 - code completion
 - auto-documenting code (kind of)
 - great help for refactoring

Especially if you work a larger team or on a long-running project by using TypeScript you will catch a lot of errors before they even reach the production system.


## Getting started

I have collected a few examples that help you get started with `TypeScript` inside `Svelte` projects. They should help you getting started. There are also some more advanced example that will help you build complex use-cases in a typesafe way. Along the road you will hopefully also learn some useful `TypeScript` tipps.

Check it out: https://github.com/ivanhofer/sveltekit-typescript-showcase
All format testing (uat testing)
Tags: uat
Published: 2022-03-21 13:54:03

# Steps to integrate Razorpay 

* Setting up Razorpay account.

* Storing API keys in settings.py

* Installing Razorpay library.

* Creating order using Razorpay API.

* Creating order at backend and also creating Razorpay order.

	* Show template

	* render to payment.html

	* Get info of call back URL

	* Done with creating an order.

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

{% gist https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea %}

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpyi6xdd3k.png)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpl6nsq0ea.png)

💡 Testing call out block
What channels/platforms do you use to market your side projects?
Tags: discuss, watercooler
Published: 2022-03-21 13:53:26

I have made a list of platforms which I used to market:
- Facebook groups/pages
- Instagram post/story
- Twitter tweet
- Product Hunt
- Indie Hacker
- Linkedin post/groups
- Hashnode post
- Hackernews
- Youtube demo video
- Slack channels
- Discord servers
- Reddit
- Quora
- Polywork
- Medium blog
- Dev.to post/listing(obviously 😂)

Anything else?
Blog 2
Tags: testing
Published: 2022-03-21 13:52:34

# Steps to integrate Razorpay 

* Setting up Razorpay account.

* Storing API keys in settings.py

* Installing Razorpay library.

* Creating order using Razorpay API.

* Creating order at backend and also creating Razorpay order.

	* Show template

	* render to payment.html

	* Get info of call back URL

	* Done with creating an order.

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

{% gist https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea %}

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpixeelmlr.png)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpg967sijg.png)

💡 Testing call out block
Build: The Web
Tags: programming, tutorial, webdev, codenewbie
Published: 2022-03-21 13:38:51

## Code & No-Code
This is a notion site that covers both **code** and **no-code** web development techniques.

The site begins with an overview of the web, including its history. The developer then explains how to create a website using **Hypertext Mark-up Language (HTML)**, design it with **Cascading Style Sheets (CSS)**, and make it interactive using **JavaScript**.

This site includes a variety of **projects**, ranging from a **todo list** to a simple and basic **chat web app**.

The focus of the site then changes to **no-code web development**, **form building**, and **automation technologies**.

Finally, the site concludes with **a list of websites** that can assist with web development.

---

## THE TABLE OF CONTENT (summarized)
- Preface
- History
- HTML
- CSS
- JavaScript
- Projects
- Git and GitHub
- Deploying Your Site

**No Code**
- Website Builders
- Form Builders
- Automation Tools

**More Tools**
- Images and Logos
- Developer Sites
- API
- Miscellaneous

**Conclusion**

---

## LINK TO THE SITE
**Try Both to see which one your prefer**
[Link to the Notion Site](https://linccodes.notion.site/linccodes/Build-The-Web-090d333a87b146319a395681c48bed9a) (Recommended)
[Link to the Notion Site designed with Popsy](build-the-web.popsy.site)

---

## WHO IS THIS SITE INTENDED FOR
Those with **an interest** in web development.

Also try no-code web builders if you don't think you can not code for whatever reason.

Don't forget to share your site with me.

---

## LET'S CONNECT
[Twitter](https://twitter.com/LincCodes)
what north-south-east-west traffic means 🧭
Tags: kubernetes, microservices, architecture, beginners
Published: 2022-03-21 13:35:18

Continuing with my short intro articles of microservice-related concepts, the next question I wanted to tackle is _traffic_. All these articles are short, so hopefully you can read through something quick while getting a cup of coffee.

I'm sure you've heard of north south, or east west traffic. This article hopefully will explain this in terms of microservices, and the lingo that goes along side these terms.

### North-South

When you have a kubernetes cluster with your services running, how does the outside end-user actually come into contact with your service? Or maybe it's something that trying to access a microservice in your cluster. This is what's considered to be _north_ traffic - i.e an outside request coming to your cluster. To handle this incoming traffic, you can set up a load balancer. A kubernetes load balancers (LB) gives a single external IP address that will forward all your incoming traffic to your service. 
South traffic is for when you have requests leaving your cluster (maybe you are returning a response, or you need to call an external API). While there is an ingress resource type provided by the Kubernetes API, there is no egress resource type :( . This is where something like Istio's Egress Resource comes in handy. 

### East-West

East-West traffic is considered to be your services communication with each other. Generally speaking, this is traffic within a data centre ("server to server traffic"), and the definition translated to reflect traffic within one's cluster. This is more straightforward than North-West.

Hope this quick read taught you something! Have a great day 🌟
twitter: [@christineskim_](https://twitter.com/christineskim_)
Pengertian Karang Gigi, Dan Proses Pembersihannya
Published: 2022-03-21 13:29:20

Pengertian Karang Gigi
Karang gigi terbentuk akibat penumpukan plak gigi yang dibiarkan terlalu lama hingga menjadi keras. Kurangnya menjaga kebersihan gigi dan mulut merupakan faktor risiko terbesar yang menyebabkan terbentuknya karang gigi.

Awalnya, plak gigi terbentuk ketika bakteri dalam mulut bercampur dengan protein dan sisa-sisa makanan. Biasanya karang gigi timbul karena sikat gigi yang kurang bersih. Jika tidak dibersihkan, maka plak tersebut dapat menyebabkan karang gigi.

Jika karang gigi dibiarkan dan tidak segera diatasi, maka bisa menimbulkan peradangan pada jaringan gigi dan gusi. Bahkan, kondisi ini juga bisa meningkatkan risiko terjadinya penyakit jantung. Untuk menghindari bahaya tersebut, pembersihan karang gigi perlu dilakukan oleh dokter gigi menggunakan teknik scaling.
[baca selengkapnya](https://serangdentalcare.blogspot.com/2022/03/pengertian-karang-gigi-dan-proses.html)