Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Scotch.io:
Build A Telegram Bot with Laravel and BotMan
Mar 07, 2018 @ 16:17:49

On the Scotch.io site there's a tutorial posted showing you how to create a Telegram bot with BotMan the popular PHP package for creating chatbots.

Being a Scotch.io reader you definitely know that we have covered creating Bots before, we have quite few posts on Slack Bots, Twitter Bots and other related topics [...] But today, we have something different for you, today we will be creating a Telegram bot for dog lovers. Yes, you heard it right. A Telegram Bot for dog lovers using Dog API.

The tutorial then walks through the entire process of getting the bot up and running including:

  • Installation of Laravel and BotMan
  • Creating the commands and testing the bot
  • Installing the Telegram driver and creating the bot
  • Using ngrok to allow external calls to come into your internal application

The post finishes by showing how to link your bot to Telegram and test it out using messages to send you random dog pictures when requested.

tagged: scotchio telegram bot botman tutorial setup configure connect

Link: https://scotch.io/tutorials/build-a-telegram-bot-with-laravel-and-botman

Scotch.io:
Full E-Commerce Integration of Snipcart with WordPress
Jun 17, 2016 @ 16:03:24

The Scotch.io site has a tutorial for the WordPress users out there needing an ecommerce solution and wanting to integrate it seamlessly into your site. They show you how to integrate Snipcart, part of a platform that handles a lot of the common ecommerce tasks for you.

Even though an exponential amount of online tools keep popping up, WordPress remains a domineering web behemoth. More than 25% of active sites run on the famous CMS. Quite a chunk of the whole world wide web.

[...] Many front-end developers I've met and talked to enjoy working with a lean, quick e-commerce solution like Snipcart. But, they also want to give more autonomy in familiar CMS to their merchant clients. Since many of them use WordPress, I thought I'd write this article to provide them with a useful resource.

The post then breaks the process down into a few different steps, each including code and screenshots as needed:

  • Installing the required plugins
  • Show products in the theme
  • Integrate Snipcart's shopping cart
  • Update inventory with webhooks
  • Add Snipcart data to WordPress admin
  • Quick edit of inventory

If you're interested in the full code required for the integration, you can see it over on this GitHub repository.

tagged: scotchio ecommerce solution snipcart wordpress tutorial integration

Link: https://scotch.io/tutorials/full-e-commerce-integration-of-snipcart-with-wordpress

Scotch.io:
Token-Based Authentication for AngularJS and Laravel Apps (continued)
Jul 06, 2015 @ 16:57:54

Scotch.io has posted the second part of their series (here's part one) continuing their look at using tokens for authentication in an AngularJs+Laravel application. They pick up where they left off in the previous part and focus on adding more of the systems around the token.

In the tutorial on Scotch.io we created a new app called jot-bot to look at how to implement token-based authentication in AngularJS and Laravel by using jwt-auth and Satellizer together. On the Laravel side, jwt-auth let’s us generate JSON web tokens when the user inputs their credentials. [...] There were a few things for a complete authentication solution that we didn’t get to in the last tutorial, including: Setting the logged-in user’s data (such as name and email address) and their authentication status, a way to redirect the user to the login page if they become logged out and how to log the user out and the implications of token-based authentication on logout.

He starts by updating the AuthenticateController to handle getting the authenticated user based on the token information. He also adds the matching route and show the kind of data it should return. He then switches to the Angular side and creates the controller to hook into the backend and get the current user information. The tutorial then shows how to relay user information back to the view and what it might look like. He then goes through a similar process for adding the logout handling including redirecting the user when logged out. Finally, he shows how to initialize the user on the frontend when the application loads, pulling the data from localstorage and checking for a valid existing session.

tagged: scotchio token authentication angularjs laravel application series part2

Link: http://ryanchenkie.com/token-based-authentication-for-angularjs-and-laravel-apps/


Trending Topics: