<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: upnrunn technologies </title>
    <description>The latest articles on DEV Community by upnrunn technologies  (@upnrunnhq).</description>
    <link>https://dev.to/upnrunnhq</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F848%2F794459fd-f7ac-44e0-866c-5b0aa41e20db.png</url>
      <title>DEV Community: upnrunn technologies </title>
      <link>https://dev.to/upnrunnhq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/upnrunnhq"/>
    <language>en</language>
    <item>
      <title>WHAT IS PRICE ANCHORING: HOW IT INCREASE SALES</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Sun, 19 Apr 2020 12:45:41 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/what-is-price-anchoring-how-it-increase-sales-4874</link>
      <guid>https://dev.to/upnrunnhq/what-is-price-anchoring-how-it-increase-sales-4874</guid>
      <description>&lt;p&gt;When Steve Jobs introduced the iPad, he said, Apple should price the iPad at $999 – and a giant $999 appeared on the screen behind him. Later, the $999 was crushed by the actual price that is $499. They had pulled off one of the oldest pricing strategies – price anchoring.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does Price Anchoring Work?
&lt;/h2&gt;

&lt;p&gt;How do you sell a $2000 watch? Put it next to a $10000 watch. The essential idea behind this is that  &lt;strong&gt;customers perceive pricing relatively&lt;/strong&gt;. An item is perceived as cheap or expensive in comparison to the initial price point or to another item whose price they knew about first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Price perception&lt;/strong&gt; – A product is truly never “cheap” or “expensive”; it’s all relative. In the case of the iPad, the initial price flashed was $999. Then,when the price was revealed to be $499, customers felt like they had saved $500. What if the initial price flashed was $399?&lt;/p&gt;

&lt;p&gt;For companies that have multiple product offerings, price anchoring can work in two ways.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;High price anchor&lt;/strong&gt; – One could price a 50″ TV at $1000 &amp;amp; a 48″ TV at $600. Customers will buy more 48-inch TVs since they can save $400 by buying a TV that’s only 2″ smaller. The idea is to price a slightly more premium product higher than the product you want to sell.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low price anchor&lt;/strong&gt; – A data subscription service could price 500MB/day package at $14.99 a month &amp;amp; unlimited data package at $29.99 a month.500MB per day is nothing today. The idea is to price your product slightly above a  basic product so they feel like they are gaining more.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Decision making&lt;/strong&gt; – Humans are naturally indecisive creatures. The decision can become so debilitating that some folks might even walk away because of the anxiety. Yet, a great way to prevent this is to label choices as the “most popular” option or the “recommended.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Case
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A kitchen retailer sells a basic mixer for $200, a mid-range one for $500 and a high-end one for $600. Some people buy the basic mixer because it is much lower than the other two, particularly the $500 anchor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Many others, however, who usually buy the mid-range, see the high-end mixer as ‘only’ $100 more, which is a much smaller gap than the $300 down to the $200 one, and so buy the high-end machine, seeing it as a relative bargain compared to the $500 anchor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The normal price of the mid-range mixer is $400 but has a low-profit margin. This strategy sells lots more basic mixers, attracting buys from people who were not thinking of buying, as well as upselling to the high-end mixer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A car salesman shows a customer an expensive car, anchoring the perception of the price at the high end. Then they show them mid-range cars which seem so much cheaper than the expensive car that customers often decide to buy these.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A magazine offers a print subscription for $190 &amp;amp; print &amp;amp; online editions for a $200.They sell lots of the dual subscription. When online studies show many customers making good use of online edition, they offer this as a single item at $150, which takes up.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A camera manufacturer offers the basic camera at a bargain $200. Lenses are extra and cost a lot more. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;For any digital product,&lt;/strong&gt; While using high price anchoring, order plans by most expensive. Add level to “ &lt;strong&gt;most popular&lt;/strong&gt; ” option or the “ &lt;strong&gt;recommended&lt;/strong&gt; plan”. Make the most popular plan stand out.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More detailed work by &lt;a href="https://twitter.com/dliciousbrains"&gt;@dliciousbrains&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For any digital product to be successful, it needs a pricing page that converts. Here are some tried and tested methods that may give your conversion rate a boost. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--16RvRAiz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f680.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--16RvRAiz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f680.png" alt="🚀"&gt;&lt;/a&gt; &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8pcpFsgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f4b0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8pcpFsgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f4b0.png" alt="💰"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/hashtag/DeliciousDesign?src=hash&amp;amp;ref_src=twsrc%5Etfw"&gt;#DeliciousDesign&lt;/a&gt; &lt;a href="https://t.co/wZIN6LpAMp"&gt;pic.twitter.com/wZIN6LpAMp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— Delicious Brains (@dliciousbrains) &lt;a href="https://twitter.com/dliciousbrains/status/1250409648261402625?ref_src=twsrc%5Etfw"&gt;April 15, 2020&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;More reference:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.priceintelligently.com/blog/bid/181199/price-anchoring-to-optimize-your-pricing-strategy"&gt;https://www.priceintelligently.com/blog/bid/181199/price-anchoring-to-optimize-your-pricing-strategy&lt;/a&gt;&lt;br&gt;&lt;br&gt;
 &lt;a href="https://www.feedough.com/what-is-price-anchoring-how-it-works/"&gt;https://www.feedough.com/what-is-price-anchoring-how-it-works/&lt;/a&gt;&lt;br&gt;&lt;br&gt;
 &lt;a href="https://www.neurosciencemarketing.com/blog/articles/anchor-prices.htm"&gt;https://www.neurosciencemarketing.com/blog/articles/anchor-prices.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;
 &lt;a href="http://changingminds.org/disciplines/marketing/pricing/price_anchoring.htm"&gt;http://changingminds.org/disciplines/marketing/pricing/price_anchoring.htm&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;WHAT IS PRICE ANCHORING: HOW IT INCREASE SALES  &lt;/p&gt;

&lt;p&gt;THREAD …&lt;/p&gt;

&lt;p&gt;— upnrunn technologies (@upnrunnHQ) &lt;a href="https://twitter.com/upnrunnHQ/status/1251836320969678848?ref_src=twsrc%5Etfw"&gt;April 19, 2020&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2020/04/what-is-price-anchoring-how-it-increase-sales/"&gt;WHAT IS PRICE ANCHORING: HOW IT INCREASE SALES&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>uncategorized</category>
    </item>
    <item>
      <title>How to Customize Paginated Links for BuddyPress Members &amp; Groups Directory Pages</title>
      <dc:creator>Mithun Biswas</dc:creator>
      <pubDate>Mon, 24 Jun 2019 07:34:37 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/how-to-customize-paginated-links-for-buddypress-members-groups-directory-pages-3bjf</link>
      <guid>https://dev.to/upnrunnhq/how-to-customize-paginated-links-for-buddypress-members-groups-directory-pages-3bjf</guid>
      <description>&lt;p&gt;BuddyPress is using the &lt;a href="https://codex.wordpress.org/Function_Reference/paginate_links"&gt;paginate_links()&lt;/a&gt; function for building paginated navigation links on members and groups directory pages. The &lt;a href="https://codex.wordpress.org/Function_Reference/paginate_links"&gt;paginate_links()&lt;/a&gt; function is working fine on directory pages but we want to customize the output a little bit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IBuTVWxL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xcxdyz1g2v31ko0udsd8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IBuTVWxL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xcxdyz1g2v31ko0udsd8.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We’d like to add the following changes to the default output of the &lt;a href="https://codex.wordpress.org/Function_Reference/paginate_links"&gt;paginate_links()&lt;/a&gt; function.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will display the number of total items.&lt;/li&gt;
&lt;li&gt;Instead of disabling the current page link, we will add text input so the user can put any number to navigate pages easily.&lt;/li&gt;
&lt;li&gt;We have links for previous and next page but will also add two additional links to navigate to the first and last page easily and remove unnecessary links.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s start.‌&lt;/p&gt;

&lt;p&gt;First, we will prepare our main function which will display pagination links based on parameters. We have customized the WordPress’s existing &lt;a href="https://codex.wordpress.org/Function_Reference/paginate_links"&gt;paginate_links()&lt;/a&gt; function to create our own &lt;code&gt;my_theme_buddypress_paginate_links()&lt;/code&gt; function.‌&lt;/p&gt;

&lt;p&gt;You can check WordPress Codex to learn more about how &lt;a href="https://codex.wordpress.org/Function_Reference/paginate_links"&gt;paginate_links()&lt;/a&gt; function works.‌&lt;/p&gt;

&lt;p&gt;Let’s start with &lt;code&gt;my_theme_buddypress_paginate_links()&lt;/code&gt; function which will return empty string for now instead of paginated links.&lt;/p&gt;

&lt;p&gt;We will define our default arguments which will be parsed with the arguments you pass when calling the function. You can pass an array of arguments for generating paginated links, and your arguments will be parsed with the defaults.&lt;/p&gt;

&lt;p&gt;Conditionally we have to disable first, previous, next and last buttons, so the user can’t click on these buttons to navigate. Let’s add conditions to update our arguments.&lt;/p&gt;

&lt;p&gt;Now update the &lt;code&gt;$output&lt;/code&gt; variable to display the number of total items.&lt;/p&gt;

&lt;p&gt;We will save our paginated links in an array and add these to the output using the &lt;code&gt;join()&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;We have added a class &lt;code&gt;button&lt;/code&gt; to each link, this will prevent running BuddyPress’s default JavaScript function for our custom paginated links.‌&lt;/p&gt;

&lt;p&gt;Now we have our own &lt;code&gt;my_theme_buddypress_paginate_links()&lt;/code&gt; function, and it’s ready to use when filtering the BuddyPress members and groups pagination links before getting displayed.‌&lt;/p&gt;

&lt;p&gt;We will filter &lt;code&gt;bp_get_members_pagination_links&lt;/code&gt; and &lt;code&gt;bp_get_groups_pagination_links&lt;/code&gt; hooks.‌&lt;/p&gt;

&lt;p&gt;The following code is for adding a hook callback to filter the members’ pagination links.&lt;/p&gt;

&lt;p&gt;The following code is for adding a hook callback to filter the members’ pagination links.&lt;/p&gt;

&lt;p&gt;We are almost done! ‌&lt;/p&gt;

&lt;p&gt;Pagination links will not work properly until we add some Javascript to send Ajax request to update the results.‌&lt;/p&gt;

&lt;p&gt;Let’s add inline Javascript in the footer of your website with WordPress &lt;a href="https://developer.wordpress.org/reference/functions/wp_footer/"&gt;wp_footer&lt;/a&gt;hook.&lt;/p&gt;

&lt;p&gt;The above Javascript will listen to onclick JavaScript event when you click on paginated links and send Ajax filter request to display the updated results of the current page.‌&lt;/p&gt;

&lt;p&gt;Let’s update the &lt;code&gt;my_theme_footer_scripts&lt;/code&gt; callback function with the following code.&lt;/p&gt;

&lt;p&gt;The above Javascript will listen to onchange JavaScript event when you enter a new value in the input field of the current page and send Ajax filter request to display the updated results of the current page.‌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/upnrunnHQ/bp-custom-pagination"&gt;Full source code&lt;/a&gt; is available to download on GitHub as a WordPress plugin, you can download or clone the repository easily.‌&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2019/06/how-to-customize-paginated-links-for-buddypress-directory-pages/"&gt;How to Customize Paginated Links for BuddyPress Members &amp;amp; Groups Directory Pages&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>buddypress</category>
    </item>
    <item>
      <title>Airtable: The next generation spreadsheets</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Sat, 15 Jun 2019 08:49:47 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/airtable-the-next-generation-spreadsheets-2005</link>
      <guid>https://dev.to/upnrunnhq/airtable-the-next-generation-spreadsheets-2005</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Ia6wZh2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/seufsob3riv64accywpz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Ia6wZh2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/seufsob3riv64accywpz.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As it says “Create, your way”&lt;/p&gt;

&lt;p&gt;Part spreadsheet, part database, and entirely flexible, teams use Airtable to organize their work, their way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vu3yGbZl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2l4q8tlgjsncv6xiimut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vu3yGbZl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2l4q8tlgjsncv6xiimut.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Spreadsheets might not be as interesting as the latest AI or Blockchain startup, but they’re the products that solve nasty problems and make people’s lives better. No one wants to mesh up with the sheet.&lt;br&gt;
Airtable can act as an alternative to one of the most critical, yet often overlooked software tools. Airtable has reinvented the spreadsheet entirely. It is like Spreadsheet, meet database. You can create your database in minutes. It solves difficult problems and makes people’s lives better.&lt;/p&gt;

&lt;p&gt;Airtable didn’t make a better spreadsheet. They have reinvented the spreadsheet entirely. You do not need to write any type of code to use it. Also you can easily expose your data to outside using APIs.&lt;/p&gt;

&lt;p&gt;Organize anything, from anywhere, with anyone.&lt;br&gt;
It has mobile and desktop apps to make it easy to edit, comment, and collaborate in real time. changes are instantly synced across everyone’s devices.&lt;/p&gt;

&lt;p&gt;Field types for your data.&lt;br&gt;
Airtable fields can capture any type of content you want to save. You can add attachments, long text notes, checkboxes, links to records in other tables—even barcodes. Stay organized Stay cool.&lt;/p&gt;

&lt;p&gt;Get the perfect view.&lt;br&gt;
Do not like the grid layout. No Problem, you can have the Grid layout along with with Kanban view, Gallery view &amp;amp; Calendar view.&lt;/p&gt;

&lt;p&gt;It gives powerful filtering, sorting, and grouping option, which gives you the freedom to arrange your work just the way you like. Choose the right views as per your need, and save them for easy access any time. Access from desktop, tablet or Mobile.&lt;/p&gt;

&lt;p&gt;Link related records easily.&lt;br&gt;
Hate duplicate data entry? No worries. It only takes a few clicks to link records between tables, creating smart relationships like our relational database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Ia6wZh2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/seufsob3riv64accywpz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Ia6wZh2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/seufsob3riv64accywpz.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Automate data using third-party integrations&lt;br&gt;
You can connect Airtable with your favourite apps and services. This would help you automatically move information back and forth between Airtable and other apps.&lt;/p&gt;

&lt;p&gt;Airtable has built-in support for many popular apps, a robust API, and can be configured to work with over 1000 websites and apps via Zapier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vRHynX2O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/g1h1op2li8b0voh3330h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vRHynX2O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/g1h1op2li8b0voh3330h.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It can be used for your Creative team or Marketing team. You can also use it for your project management as well as Recruiting solution using their template library.&lt;/p&gt;

&lt;p&gt;Do you use Airtable?&lt;/p&gt;

</description>
      <category>airtable</category>
    </item>
    <item>
      <title>Using Eloquent in WordPress Plugin Development</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Mon, 06 May 2019 17:07:54 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/using-eloquent-in-wordpress-plugin-development-44ll</link>
      <guid>https://dev.to/upnrunnhq/using-eloquent-in-wordpress-plugin-development-44ll</guid>
      <description>&lt;p&gt;WordPress is great but I really hate it when I have to write SQL queries. Most of the developers I have seen don’t really like writing SQL Queries. WordPress Comes with $wpdb class but you still have to write sql queries. $wpdb is fine when you have small number of queries to make but If you have ever encountered a situation where you have work with lots of custom database tables and have to join them with different tables, you know the pain.&lt;/p&gt;

&lt;p&gt;I came across similar situation and instead writing ugly sql queries , I came up with a solution using Eloquent. Eloquent is ORM developed by Laravel framework. This is very easy to work with and you can still write sql queries with Eloquent if you want to. I am not going to talk about features of Eloquent in this article. You can look into official &lt;a href="https://laravel.com/docs/5.4/eloquent"&gt;eloquent documentation&lt;/a&gt; for more information about Eloquent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lets start setting up our plugin.
&lt;/h3&gt;

&lt;p&gt;I assume you have a working WordPress installation and You have composer installed in your machine. If you are not sure what composer is, Composer is dependency manager for php. You can visit &lt;a href="https://getcomposer.org/"&gt;composer’s official page&lt;/a&gt; for more information and download.&lt;/p&gt;

&lt;p&gt;Lets navigate to WordPress  plugins directory and create a folder for our plugin, I am going to name my plugin _ &lt;strong&gt;“wpdrift-client”&lt;/strong&gt; _.&lt;/p&gt;

&lt;p&gt;I have composer installed globally in my machine, if your composer is not global, you might want to copy composer.phar file into your plugin directory and use “ &lt;strong&gt;&lt;em&gt;composer.phar&lt;/em&gt;&lt;/strong&gt; ” instead of  “ &lt;strong&gt;&lt;em&gt;composer&lt;/em&gt;&lt;/strong&gt; ” when making composer commands. lets require illuminate\database package from composer. Open your terminal window and cd into the plugin folder &lt;em&gt;(i.e. wordpress-installation/wp-content/plugins/wpdrift-client)&lt;/em&gt; and type following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require illuminate/database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your plugin folder should look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z1BvECnA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/wpdrift.com/blog/wp-content/uploads/2017/07/Screen-Shot-2017-07-21-at-4.40.55-PM-300x52.png%3Fresize%3D300%252C52%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z1BvECnA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/wpdrift.com/blog/wp-content/uploads/2017/07/Screen-Shot-2017-07-21-at-4.40.55-PM-300x52.png%3Fresize%3D300%252C52%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Composer has generated &lt;em&gt;vendor&lt;/em&gt; directory which includes are package, &lt;em&gt;composer.json&lt;/em&gt; file and &lt;em&gt;composer.lock&lt;/em&gt; file. Lets open &lt;em&gt;composer.json&lt;/em&gt; and setup our namespace. Lets edit it to look something like following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "require": { "illuminate/database": "^5.4" }, "autoload": { "psr-4": { "Models\\": "app/models", "Controllers\\": "app/controllers" } } }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run a composer command from your terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer dump-autoload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have setup namespace for our models and controllers now lets create these folders. We will be creating a folder named _ &lt;strong&gt;“app”&lt;/strong&gt; _ and inside that we will create two folders _ &lt;strong&gt;“models”&lt;/strong&gt; _ and _ &lt;strong&gt;“controllers”&lt;/strong&gt; _ which will store our Models and Controllers respectively. You can name your namespace anything you like.&lt;/p&gt;

&lt;p&gt;We have installed Eloquent successfully, lets go ahead and create other files for plugin. We will create a main plugin file &lt;em&gt;“wpdrift-clients.php”&lt;/em&gt;, a blank &lt;em&gt;“index.php”&lt;/em&gt; file, &lt;em&gt;“assets”&lt;/em&gt; folder which will store our css, js, images and fonts, we will also create a folder named &lt;em&gt;views&lt;/em&gt; which will store views for our plugin. We will also create a folder called &lt;em&gt;“core”&lt;/em&gt; which will be responsible for storing other files like plugin activation hook, connecting eloquent to database and helpers.&lt;/p&gt;

&lt;p&gt;After creating these files and folders, your plugin directory should look something like this:&lt;br&gt;&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wkfvIyxn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/wpdrift.com/blog/wp-content/uploads/2017/07/Screen-Shot-2017-07-27-at-5.08.05-PM-600x377.png%3Fresize%3D600%252C377%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wkfvIyxn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/wpdrift.com/blog/wp-content/uploads/2017/07/Screen-Shot-2017-07-27-at-5.08.05-PM-600x377.png%3Fresize%3D600%252C377%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me explain what I did here:&lt;/p&gt;

&lt;p&gt;We are creating a database table named “clients” (with prefix), &lt;em&gt;core/create_db_tables.php&lt;/em&gt; includes code to create database, &lt;em&gt;core/class-enqueue.php&lt;/em&gt; is responsible for styles and scripts required for plugin. &lt;em&gt;helpers.php&lt;/em&gt; includes helper functions. Pretty much most of the things are included inside &lt;em&gt;core/init.php&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here are the codes for these files:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Main plugin file : wpdrift-client.php&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/\* Plugin Name: WpDrift Clients Plugin URI: http://wpdrift.com Description: Custom plugin using Eloquent Version: 1.0 Author: WPDrift Author URI: http://wpdrift.com License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html Text Domain: wpdrift-clients Domain Path: /languages \*/ if(! defined('ABSPATH')) exit; if( ! defined('WPDRIFT\_CLIENTS\_URl')){ define('WPDRIFT\_CLIENTS\_URl',plugin\_dir\_url(\_\_FILE\_\_)); } if( ! defined('WPDRIFT\_CLIENTS\_PATH')){ define('WPDRIFT\_CLIENTS\_PATH',plugin\_dir\_path(\_\_FILE\_\_)); } require WPDRIFT\_CLIENTS\_PATH.'/core/create\_db\_tables.php'; register\_activation\_hook(\_\_FILE\_\_,'wpdrift\_clients\_custom\_tables'); if(! class\_exists('Wpdrift\_Clients')){ class Wpdrift\_Clients { function \_\_construct(){ add\_action('plugins\_loaded',[$this,'include\_dependencies']); } function include\_dependencies() { include WPDRIFT\_CLIENTS\_PATH.'/core/init.php'; } } } new Wpdrift\_Clients();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;core/init.php&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require WPDRIFT\_CLIENTS\_PATH.'/vendor/autoload.php'; /\*database connection\*/ $capsule = new Illuminate\Database\Capsule\Manager; $capsule-\&amp;gt;addConnection(['driver' =\&amp;gt; 'mysql', 'host' =\&amp;gt; DB\_HOST, 'database' =\&amp;gt; DB\_NAME, 'username' =\&amp;gt; DB\_USER, 'password' =\&amp;gt; DB\_PASSWORD, 'charset' =\&amp;gt; 'utf8', 'collation' =\&amp;gt; 'utf8\_unicode\_ci', 'prefix' =\&amp;gt; '',]); $capsule-\&amp;gt;setAsGlobal(); $capsule-\&amp;gt;bootEloquent(); // enqueue styles and scripts with class-enqueue.php // helper functions helper.php include\_once WPDRIFT\_CLIENTS\_PATH.'/core/helpers.php'; include\_once WPDRIFT\_CLIENTS\_PATH.'/core/class-enqueue.php'; // add ajax actions $actions = new Controllers\ActionController(); add\_action('wp\_ajax\_create\_client',[$actions,'create']); add\_action('wp\_ajax\_delete\_client',[$actions,'delete']); // shortcode add\_shortcode('wpdrift\_clients',function(){ wpdrift\_clients\_load\_view('clients',['title'=\&amp;gt;'Clients list']); });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;core/class-enqueue.php&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(! class\_exists('Wpdrift\_Clients\_Enqueue')){ class Wpdrift\_Clients\_Enqueue { function \_\_construct(){ add\_action('wp\_enqueue\_scripts',array($this,'enqueue')); } function enqueue() { wp\_enqueue\_style('wpdrift-clients',WPDRIFT\_CLIENTS\_URl.'assets/css/wpdrift-clients.css'); wp\_enqueue\_script('jquery'); wp\_enqueue\_script('wpdrift-clients',WPDRIFT\_CLIENTS\_URl.'assets/js/wpdrift-clients.js',array('jquery'),'1.0',true); } } new Wpdrift\_Clients\_Enqueue(); }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;core/helpers.php&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function wpdrift\_clients\_load\_view($file,$data=[]){ if(! empty($data)){ extract($data); } if(file\_exists(WPDRIFT\_CLIENTS\_PATH.'views/'.$file.'.php')){ include\_once WPDRIFT\_CLIENTS\_PATH.'views/'.$file.'.php'; } else{ echo 'File not found in '.WPDRIFT\_CLIENTS\_PATH.'views/'.$file.'.php'; } } function get\_clients(){ $clients = Models\Client::all(); return $clients; }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically, we are just displaying a view with shortcode. Shortcode will trigger a function &lt;em&gt;wpdrift_clients_load_view() (Location: core/helpers.php)&lt;/em&gt; , this function will extract array argument and include a view from &lt;em&gt;views&lt;/em&gt; folder.&lt;/p&gt;

&lt;p&gt;View file includes a table which is displaying dynamic data with a function &lt;em&gt;get_clients() (Location: core/helpers.php)&lt;/em&gt;, this function gets data from &lt;em&gt;Client&lt;/em&gt; Model.&lt;/p&gt;

&lt;p&gt;each dynamic data has a delete button which is a form with a ajax action, (&lt;em&gt;Action defined on core/init.php&lt;/em&gt;), call back for these actions are stored in &lt;em&gt;app/controllers/ActionController.php&lt;/em&gt;, this controller is using &lt;em&gt;app/models/Clinet.php&lt;/em&gt; to interact with clients table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;app/controllers/ActionController.php&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace Controllers; use Models\Client as Client; class ActionController { function create(){ $name = $\_POST['name']; $email = $\_POST['email']; $phone = $\_POST['phone']; $purchased\_service = $\_POST['service']; $client = new Client; $client-\&amp;gt;name = $name; $client-\&amp;gt;email = $email; $client-\&amp;gt;phone = $phone; $client-\&amp;gt;purchased\_service = $purchased\_service; $client-\&amp;gt;save(); $response = ['response\_type' =\&amp;gt; 'success', 'response\_data' =\&amp;gt; [ 'name' =\&amp;gt; $clinet-\&amp;gt;name, 'email' =\&amp;gt; $clinet-\&amp;gt;email, 'phone' =\&amp;gt; $clinet-\&amp;gt;phone, 'service' =\&amp;gt; $clinet-\&amp;gt;purchased\_service,] ]; return $response; die(); } function delete(){ $client\_id = $\_POST['client\_id']; $client = Client::find($client\_id); if($client){ $client-\&amp;gt;delete(); return 'success'; die(); } return false; die(); } }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;app/models/Client.php&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace Models; use Illuminate\Database\Eloquent\Model as Model; class Client extends Model { protected $table; public $timestamps = false; function \_\_construct() { parent::\_\_construct(); $this-\&amp;gt;table = $this-\&amp;gt;get\_table\_name('clients'); } private function get\_table\_name($name) { global $wpdb; return $wpdb-\&amp;gt;prefix.$name; } }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As You can see, we don’t have much code on our model, all we are telling model is to use &lt;em&gt;prefix_clients&lt;/em&gt; table, Eloquent by default expects table to have &lt;em&gt;created_at&lt;/em&gt; and &lt;em&gt;updated_at&lt;/em&gt; column. So, by defining &lt;em&gt;public $timestamps = false;&lt;/em&gt; we are disabling that feature. Eloquent assumes you have a primary key table with the name &lt;em&gt;id&lt;/em&gt;, if you are thinking of using some other name, you will have to define one more property called &lt;em&gt;$primaryKey&lt;/em&gt; . For example, if you are creating a model for WordPress native &lt;em&gt;Users&lt;/em&gt; table, it would look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace Models; use Illuminate\Database\Eloquent\Model as Model; class User extends Model { protected $table; public $timestamps = false; protected $primaryKey = 'ID'; function \_\_construct() { parent::\_\_construct(); $this-\&amp;gt;table = 'wp\_users'; $this-\&amp;gt;table = $this-\&amp;gt;get\_table\_name('users'); } private function get\_table\_name($name) { global $wpdb; return $wpdb-\&amp;gt;prefix.$name; } function meta() { return $this-\&amp;gt;hasMany('App\Usermeta'); } function posts() { return $this-\&amp;gt;hasMany('App\Post'); } }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example &lt;em&gt;meta and posts&lt;/em&gt; method define relationship with other Models “Usermeta and Post”, which can use usermeta and posts table.&lt;/p&gt;

&lt;p&gt;We built a very basic plugin using eloquent orm. But this article is not about how big the plugin is but structuring your plugin to use &lt;em&gt;MVC&lt;/em&gt; architecture and using Eloquent orm with your plugin. This article only focused on using MVC and Eloquent, you will have to implement security when you build your real plugin.&lt;/p&gt;

&lt;p&gt;Hence, if you are using creating a big custom plugin with lots of custom tables, I believe this approach will be very manageable and easy where as I would not suggest you to use this approach to publish your plugin in &lt;em&gt;wordpress.org&lt;/em&gt; as it makes extra database connection and user is using 5 plugins with similar approach, they will have 6 database connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://wpdrift.com/blog/wp-content/uploads/2017/07/wpdrift-clients-2.zip"&gt;Download code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2019/05/using-eloquent-in-wordpress-plugin-development/"&gt;Using Eloquent in WordPress Plugin Development&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>eloquent</category>
      <category>plugin</category>
    </item>
    <item>
      <title>How To Extend WP REST API From Your Custom Plugin: Part 4</title>
      <dc:creator>Mithun Biswas</dc:creator>
      <pubDate>Wed, 17 Oct 2018 06:14:25 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/how-to-extend-wp-rest-api-from-your-custom-plugin-part-4-4elh</link>
      <guid>https://dev.to/upnrunnhq/how-to-extend-wp-rest-api-from-your-custom-plugin-part-4-4elh</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is article 4 of 5 in the series “How To Extend WP REST API From Your Custom Plugin”&lt;/strong&gt;. In case you missed the previous tutorials check the list below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://upnrunn.com/blog/2018/02/extend-wp-rest-api-custom-plugin-part-1/"&gt;How To Extend WP REST API From Your Custom Plugin (Part 1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://upnrunn.com/blog/2018/02/extend-wp-rest-api-custom-plugin-part-2/"&gt;How To Extend WP REST API From Your Custom Plugin (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/kish2011_/how-to-extend-wp-rest-api-from-your-custom-plugin-part-3-4mbk-temp-slug-5990155"&gt;How To Extend WP REST API From Your Custom Plugin (Part 3)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We have created a controller class in the last tutorial to fetch restaurant items and a single restaurant item. A controller class helps to handle the functionality of an endpoint easily. You can learn more about the controller class by reading the REST API Handbook regarding Controller Classes.&lt;/p&gt;

&lt;p&gt;In this tutorial, we will write a few controller methods to update or delete a single restaurant item. Make sure you have installed WP Restaurant Listings and the custom plugins we created in the last tutorials.&lt;/p&gt;

&lt;p&gt;First, we will add a delete method to the existing route where we can send HTTP request to delete a restaurant item.&lt;/p&gt;

&lt;p&gt;The delete method we have just added accepts one argument to choose whether to bypass trash and force deletion. However, we have to add two missing methods &lt;code&gt;delete_item&lt;/code&gt; and &lt;code&gt;delete_item_permissions_check&lt;/code&gt; also.&lt;/p&gt;

&lt;p&gt;Now, our &lt;code&gt;delete_item&lt;/code&gt; method is ready which is responsible for deleting a restaurant item. We will write logic in &lt;code&gt;delete_item_permissions_check&lt;/code&gt; method to check if a given request has access to delete a restaurant item.&lt;/p&gt;

&lt;p&gt;You have noticed that we are using the &lt;code&gt;get_restaurant&lt;/code&gt; method, let us add this method also.&lt;/p&gt;

&lt;p&gt;Finally, everything is ready to delete a restaurant item by sending a simple HTTP &lt;code&gt;DELETE&lt;/code&gt; request.&lt;/p&gt;

&lt;p&gt;Let’s send a HTTP &lt;code&gt;DELETE&lt;/code&gt; request to &lt;code&gt;wp-json/rest-tutorial/v1/restaurants/{id}&lt;/code&gt; endpoint. If the restaurant has been deleted successfully you will get the following response.&lt;/p&gt;

&lt;p&gt;When sending a request using &lt;a href="https://www.getpostman.com/"&gt;Postman&lt;/a&gt; make sure you have installed &lt;a href="https://github.com/WP-API/Basic-Auth"&gt;Basic Auth&lt;/a&gt; plugin for basic authentication.&lt;/p&gt;

&lt;p&gt;You also can set param &lt;code&gt;force=true&lt;/code&gt; to permanently delete item instead of moving to trash.&lt;/p&gt;

&lt;p&gt;In the next tutorials, we will learn how to create and update a restaurant item by sending the HTTP POST method.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2018/10/how-to-extend-wp-rest-api-from-your-custom-plugin-part-4/"&gt;How To Extend WP REST API From Your Custom Plugin: Part 4&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>blog</category>
    </item>
    <item>
      <title>How to Set up Job Queue in Laravel?</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Wed, 26 Sep 2018 04:12:34 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/how-to-set-up-job-queue-in-laravel-i4k</link>
      <guid>https://dev.to/upnrunnhq/how-to-set-up-job-queue-in-laravel-i4k</guid>
      <description>&lt;p&gt;Today I will going to show how to setup the job queue on &lt;strong&gt;Laravel 5.6&lt;/strong&gt; , So first of all let me explain what is job queue?&lt;/p&gt;

&lt;p&gt;“Queues allow you to defer the processing of a time consuming task, such as sending an email, until a later time. Deferring these time consuming tasks drastically speeds up web requests to your application.”&lt;/p&gt;

&lt;p&gt;Job Queue is setup that laravel system have to run process in background on server without stopping / interrupting current execution. It is helping to run complex time consuming tasks.&lt;/p&gt;

&lt;p&gt;So that the process or code will run on server side with specified site. So it will improve site speed.&lt;/p&gt;

&lt;p&gt;Let us say you are having one site, it is having mail for new user registered user. And once user registered with site mail will be send to their address.&lt;/p&gt;

&lt;p&gt;It will take little time while user registering with site as mail will take 4-5 seconds to send an email.&lt;/p&gt;

&lt;p&gt;So user will experience the slowness of site, to solve this issue laravel job queue can be used, like say once user is registered successfully with site, then one new job process will be created and it will be executed in background without affection of current execution.&lt;/p&gt;

&lt;p&gt;There are several steps involved in setup the job queue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Queue Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The queue configuration file is stored in &lt;strong&gt;config/queue.php&lt;/strong&gt;. In this file you will find connection configurations for each of the queue drivers that are included with the framework, which includes a &lt;strong&gt;database&lt;/strong&gt; , &lt;strong&gt;Beanstalkd&lt;/strong&gt; , &lt;strong&gt;Amazon SQS&lt;/strong&gt; , &lt;strong&gt;Redis&lt;/strong&gt; , and a &lt;strong&gt;synchronous&lt;/strong&gt; driver that will execute jobs immediately (for local use). A null queue driver is also included which discards queued jobs.&lt;/p&gt;

&lt;p&gt;Here I am providing database as queue driver setting up option.&lt;/p&gt;

&lt;p&gt;In .env file add / edit following value&lt;/p&gt;

&lt;p&gt;&lt;code&gt;QUEUE_DRIVER=database&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As it has sync as by default value in config/queue.php file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : there are many other drivers are available see the following doc for more reference:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://laravel.com/docs/5.6/queues"&gt;https://laravel.com/docs/5.6/queues&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Setting up the database table for queue&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So run following command to create queue table schema migration.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;“php artisan queue:table”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then run &lt;code&gt;“php artisan migrate”&lt;/code&gt; to run migration for queue table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Create a job&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To create a job there you can run &lt;code&gt;“php artisan make:job ProcessPodcast”&lt;/code&gt;, that will create a new job file under ‘app\Jobs’ directory.&lt;/p&gt;

&lt;p&gt;It will have following file contents&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;‘handle’&lt;/strong&gt; method is called when the job is processed by the queue. Note that we are able to type-hint dependencies on the handle method of the job. The Laravel service container automatically injects these dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Dispatch the job&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you have written your job class, you may dispatch it using the ‘ &lt;strong&gt;dispatch&lt;/strong&gt; ’ method on the job itself. The arguments passed to the dispatch method will be given to the job’s constructor:&lt;/p&gt;

&lt;p&gt;From your controller file you can dispatch job by adding&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Process queue&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To process created job queue need to run following command&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan queue:work --tries=3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;One approach to specifying the maximum number of times a job may be attempted is via the  &lt;code&gt;--tries&lt;/code&gt; switch on the Artisan command line:&lt;/p&gt;

&lt;p&gt;You can also specify try to job file&lt;/p&gt;

&lt;p&gt;&lt;code&gt;public $tries = 5;&lt;/code&gt; like this way.&lt;/p&gt;

&lt;p&gt;Once you have written your job class, you may dispatch it using the &lt;strong&gt;‘dispatch’&lt;/strong&gt; method on the job itself. The arguments passed to the dispatch method will be given to the job’s constructor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alternate of step 5: Setup up the Supervisor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have live server then it is recommended that you should setup the supervisor on server and it will automatically run queue worker.&lt;/p&gt;

&lt;p&gt;To configure supervisor there are below steps involved&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;i)&lt;/strong&gt; Installing Supervisor&lt;br&gt;&lt;br&gt;
Run &lt;code&gt;“sudo apt-get install supervisor”&lt;/code&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ii)&lt;/strong&gt; Configuring Supervisor&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Supervisor configuration files are typically stored in the &lt;strong&gt;/etc/supervisor/conf.d&lt;/strong&gt; directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let’s create a &lt;strong&gt;laravel-worker.conf&lt;/strong&gt; file that starts and monitors a &lt;strong&gt;queue:work&lt;/strong&gt; process:&lt;/p&gt;

&lt;p&gt;In this example, the numprocs directive will instruct Supervisor to run 8 queue:work processes and monitor all of them, automatically restarting them if they fail. Of course, you should change the queue:work sqs portion of the command directive to reflect your desired queue connection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;iii)&lt;/strong&gt; Starting Supervisor&lt;/p&gt;

&lt;p&gt;Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo supervisorctl reread&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo supervisorctl update&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo supervisorctl start laravel-worker:*&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For more information on Supervisor, consult the &lt;a href="http://supervisord.org/index.html"&gt;Supervisor documentation.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Dealing With Failed Jobs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes your queued jobs will fail. Don’t worry, things don’t always go as planned! Laravel includes a convenient way to specify the maximum number of times a job should be attempted. After a job has exceeded this amount of attempts, it will be inserted into the &lt;strong&gt;failed_jobs&lt;/strong&gt; database table. To create a migration for the failed_jobs table, you may use the   &lt;strong&gt;queue:failed-table&lt;/strong&gt; command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan queue:failed-table&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan migrate&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then, when running your queue worker, you should specify the maximum number of times a job should be attempted using the &lt;strong&gt;–tries&lt;/strong&gt; switch on the queue:work command. If you do not specify a value for the &lt;strong&gt;–tries&lt;/strong&gt; option, jobs will be attempted indefinitely:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan queue:work redis --tries=3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Job queue is very useful in system like if you have large amount of data on one server and want to transfer using API to another server, then it is highly recommended to use job queue.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2018/09/how-to-set-up-job-queue-in-laravel/"&gt;How to Set up Job Queue in Laravel?&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>lumen</category>
    </item>
    <item>
      <title>Microsoft Power BI Embedded a WordPress Plugin</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Thu, 09 Aug 2018 09:27:28 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/microsoft-power-bi-embedded-a-wordpress-plugin-45i</link>
      <guid>https://dev.to/upnrunnhq/microsoft-power-bi-embedded-a-wordpress-plugin-45i</guid>
      <description>&lt;p&gt;&lt;strong&gt;1. What is Power BI?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Power BI is a business analytics service provided by Microsoft. It provides interactive visualizations with self-service business intelligence capabilities, where end users can create reports and dashboards by themselves, without having to depend on information technology staff or database administrators.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. How it useful in real business word&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Power BI is a suite of business analytics tools that deliver insights throughout your organization. Connect to hundreds of data sources, simplify data prep, and drive ad hoc analysis. Produce beautiful reports, then publish them for your organization to consume on the web and across mobile devices. Everyone can create personalized dashboards with a unique, 360-degree view of their business. And scale across the enterprise, with governance and security built-in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Embed analytics in your own application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With Power BI Embedded—for application developers—you can embed visual analytics in your products, so your users and customers can gain valuable insights, and you can get to market fast. To embed Power BI in your application or portal, you’ll need at least one Power BI Pro account, which will serve as a master account for your application. This master account will allow you to generate embed tokens to enable your application to access Power BI dashboards, reports, and visualizations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Embed analytics in your WordPress site&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We have created ‘Power BI Embedded for WordPress’ (URL: &lt;a href="https://wordpress.org/plugins/embed-power-bi/"&gt;https://wordpress.org/plugins/embed-power-bi/&lt;/a&gt;) plugin, it uses the Power BI REST APIs and JavaScript APIs to embed Power BI dashboards, reports, tiles and various types of content on a WordPress site using a short-code. The plugin follows the “app owns data” process as documented by Microsoft at &lt;a href="https://docs.microsoft.com/en-us/power-bi/developer/embedding-content"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedding-content&lt;/a&gt;. See &lt;a href="https://docs.microsoft.com/en-us/power-bi/developer/embedding"&gt;https://docs.microsoft.com/en-us/power-bi/developer/embedding&lt;/a&gt; for more information from Microsoft on how to Power BI embed content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. What are the steps to integrate with WordPress as a plugin and how it is being built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to plugin URL: &lt;a href="https://wordpress.org/plugins/embed-power-bi/"&gt;https://wordpress.org/plugins/embed-power-bi/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are the different-different way to install WordPress plugin that is&lt;/p&gt;

&lt;p&gt;– Go to your WordPress admin area and then go to plugins listing and then click on Add New button link that is on top of the listing, from add plugin page&lt;/p&gt;

&lt;p&gt;You can search for ‘Power BI Embedded for WordPress’ plugin in the search box and then the plugin will appear in the searched listing, you can click on Install Now button.&lt;/p&gt;

&lt;p&gt;– Another way to install a plugin you can download it from wordpress.org site, that plugin URL: &lt;a href="https://wordpress.org/plugins/embed-power-bi/"&gt;https://wordpress.org/plugins/embed-power-bi/&lt;/a&gt;  and install it on your WordPress hosted site in the plugins directory and enable that plugin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Steps to have a plugin for your power BI account&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need to have power bi account that will be required once you installed this plugin. On settings option of Power BI, you can configure details like,&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
User Name, Password, Client ID, Client Secret.&lt;br&gt;
&lt;/code&gt;&lt;br&gt;&lt;br&gt;
After adding the following details save settings and you should be able to see the right tick mark for OAuth Status field.&lt;/p&gt;

&lt;p&gt;After configuring the plugin you can use the plugin like adding the short-code on a page. You can add Power BI Items from Power BI Menu and add new post type, fill up the details as per the requirement and publish the item.&lt;/p&gt;

&lt;p&gt;One short-code will be generated that will appear on Items listing page.&lt;/p&gt;

&lt;p&gt;Ex: &lt;strong&gt;[powerbi id=”13″ width=”100%” height=”350px”]&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use this short-code in your posts or page to render the Power BI section.&lt;/p&gt;

&lt;p&gt;Another important feature that we have added into the power bi plugin that is for managing and controlling the resource that is created on Azure portal.&lt;/p&gt;

&lt;p&gt;This option allows the wp-admin to control the resource like in a way so that they can schedule the resource to &lt;strong&gt;START&lt;/strong&gt; and &lt;strong&gt;PAUSE&lt;/strong&gt; resource using API call.&lt;/p&gt;

&lt;p&gt;We have added an option to save the few required details that need to be configured in plugins settings page that is like under &lt;em&gt;‘Schedule Power BI Resource’&lt;/em&gt; section. There is an option to add &lt;em&gt;Tenant ID, Subscription ID, Resource Group, Capacity&lt;/em&gt;. All these information needs to control a resource remotely using this plugin.&lt;/p&gt;

&lt;p&gt;After adding proper settings you can select a time to &lt;strong&gt;START&lt;/strong&gt; and &lt;strong&gt;PAUSE&lt;/strong&gt; resource for each weekday.&lt;/p&gt;

&lt;p&gt;Ex: &lt;em&gt;If you want the schedule like on Monday resource should start at 8 am and should pause at 10 pm, then you can choose this way&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Select the drop-down that is for &lt;strong&gt;Monday&lt;/strong&gt; Field and select &lt;strong&gt;8:00&lt;/strong&gt; for Start drop-down and select &lt;strong&gt;22:00&lt;/strong&gt; for pause the resource.&lt;/p&gt;

&lt;p&gt;For this, we have used wp-cron native WordPress schedule option to start and pause events. So the wp-cron will trigger upon visiting the site at 8 am if someone visits your site then the resource will be started automatically, and same for pause option.&lt;/p&gt;

&lt;p&gt;This will not work properly if your site visitors are less and your site not having visitors that much in that case you can see the option to setup the cron job on your hosted server.&lt;/p&gt;

&lt;p&gt;You can configure the cron job on your server that will run on every 30 minutes, that will allow more accurate events to occur like resource start and pause will happen on time.&lt;/p&gt;

&lt;p&gt;To configure the cron job for WordPress see: &lt;a href="https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-wordpress"&gt;https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-wordpress&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to monitor the schedule cron event then you can also install: &lt;a href="https://wordpress.org/plugins/wp-crontrol/"&gt;https://wordpress.org/plugins/wp-crontrol/&lt;/a&gt;, this plugin shows the listed cron events where you can control your power bi resource.&lt;/p&gt;

&lt;p&gt;Same likewise you can set up the time for each weekday if you want. If you do not want to start and pause resource on Monday than simply selects &lt;strong&gt;START&lt;/strong&gt; option from start drop-down and same with &lt;strong&gt;PAUSE&lt;/strong&gt; select pause option from that respected drop-down field.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Added new feature to have controls over Power BI Azure Resource that is configured on Azure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;– How we have implemented this plugin for scheduling the resource&lt;/p&gt;

&lt;p&gt;For adding a new feature to the power bi that can control resources remotely, they are providing some &lt;strong&gt;REST API&lt;/strong&gt; endpoints that we have used to control resources.&lt;/p&gt;

&lt;p&gt;On their blog, they mentioned updates &lt;a href="https://powerbi.microsoft.com/en-us/blog/power-bi-developer-community-november-update/"&gt;https://powerbi.microsoft.com/en-us/blog/power-bi-developer-community-november-update/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First of all, we have added an option that is need OAuth token that is being required in a start and pauses API call.&lt;br&gt;&lt;br&gt;
It is being generated from : &lt;strong&gt;&lt;a href="https://login.microsoftonline.com/%7BAzure"&gt;https://login.microsoftonline.com/{Azure&lt;/a&gt; Tenant Id}/oauth2/token&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
where we had made POST API call for that we have posted following values like&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
grant_type="client_credentials"&lt;br&gt;
client_id={client id}&lt;br&gt;
client_secret={client secret}&lt;br&gt;
resource="https://management.azure.com/"&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : Client id and secret are in the main setting section.&lt;/p&gt;

&lt;p&gt;This call provides the OAuth token that is being used in management.azure.com resource management API calls.&lt;/p&gt;

&lt;p&gt;So to &lt;strong&gt;PAUSE&lt;/strong&gt; resource we can have :&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
https://management.azure.com/subscriptions/{Enter subscriptionId}/resourceGroups/{Enter resourceGroupName}/providers/Microsoft.PowerBIDedicated/capacities/{Enter dedicatedCapacityName}/suspend?api-version=2017-01-01-preview&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In this call, we need to pass above generated OAuth management. azure token.&lt;/p&gt;

&lt;p&gt;Same likewise with &lt;strong&gt;START&lt;/strong&gt; resource:&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
https://management.azure.com/subscriptions/{Enter subscriptionId\}/resourceGroups/{Enter resourceGroupName\}/providers/Microsoft.PowerBIDedicated/capacities/{Enter dedicatedCapacityName\}/resume?api-version=2017-01-01-preview&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This call also needs to have OAuth token like above.&lt;/p&gt;

&lt;p&gt;After that, we have added an option that will allow us to set up the schedule to manage resource from plugin setting page.&lt;/p&gt;

&lt;p&gt;We have added the new settings for all weekdays so admin can manage their resource easily from WordPress admin automatically.&lt;/p&gt;

&lt;p&gt;We had thought on the best solution to check what we can do to trigger automatic action to control resource, and the solution is as WordPress has an option to set up the scheduled event(&lt;a href="https://codex.wordpress.org/Function_Reference/wp_schedule_event"&gt;https://codex.wordpress.org/Function_Reference/wp_schedule_event&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;We had set up the cron event for start and pause resource and for that, we have had taken site time zone that has been set on WordPress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : To control resource more accurately it is suggested to set up the cron job on your WordPress hosted server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;It is easy to control the power bi azure resource using our plugin automatically. And it is easy to configure. Now you do not need to manually start/pause resource on Azure portal cool.&lt;/p&gt;

&lt;p&gt;If you do have any query contact us: &lt;a href="https://upnrunn.com/contact/"&gt;https://upnrunn.com/contact/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2018/08/microsoft-power-bi-embedded-a-wordpress-plugin/"&gt;Microsoft Power BI Embedded a WordPress Plugin&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>powerbi</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Why your next project should be in Laravel?- A complete guide!</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Tue, 10 Jul 2018 16:40:11 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/why-your-next-project-should-be-in-laravel-a-complete-guide-3152</link>
      <guid>https://dev.to/upnrunnhq/why-your-next-project-should-be-in-laravel-a-complete-guide-3152</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A lot of PHP based framework is available in the market but many turn out for Laravel as the framework. The reason behind is that &lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt; is a framework which is the freeand open source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt; is favored by the developers due to the stress-free coding and programming that it offers. The following framework works quite well for developing high-quality web applications as well as websites.&lt;/p&gt;

&lt;p&gt;It also has a very good MVC architectural pattern and quick development approach that makes it stand out from the rest of the framework. &lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt; is currently being used in many industries worldwide.&lt;/p&gt;

&lt;p&gt;So, in the following article, we would we cover the features of Laravel and why you should be using it for your next project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are the reasons why your next project should be in Laravel.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Object-oriented **&lt;/strong&gt; Libraries**&lt;br&gt;&lt;br&gt;
One of the top reasons why Laravel is considered as the best PHP framework because it has object-oriented libraries already installed which might not be formed in other PHP frameworks. It also has a collection of pre-installed libraries such as authentication library. The implementation of the following is quite easy and it comes up with a lot of advanced features such as password reset, CSRF encryption, and protection as well as Bcrypt hashing.&lt;br&gt;&lt;br&gt;
2) &lt;strong&gt;Security&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
While the development of a web application takes place, then it is quite necessary that the security of the web application is performed.&lt;/p&gt;

&lt;p&gt;Laravel very well manage the security part within the framework. It makes use of the hashed and salted password, which certainly means that the password would never be saved in the form of plain text in the database.&lt;/p&gt;

&lt;p&gt;It makes use of the bcrypthashing algorithm for generating the password that is being saved. It also makes use of the SQL statements for making injection attacks unimaginable.&lt;/p&gt;

&lt;p&gt;Some of the security features that are used by Laravel have been mentioned below:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storing passwords&lt;/li&gt;
&lt;li&gt;Encryption&lt;/li&gt;
&lt;li&gt;Protecting routes&lt;/li&gt;
&lt;li&gt;Configuration&lt;/li&gt;
&lt;li&gt;HTTP basic authentication&lt;/li&gt;
&lt;li&gt;Password reset and remainders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3) &lt;strong&gt;MVC support&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the other top reasons why Laravel is the top framework of PHP is because of the fact that it is made using MVC architecture similar to Symfony and hence it ensures that there is a great clarity between presentation and logic.&lt;/p&gt;

&lt;p&gt;MVC helps in boosting the performance has various built-in functionalities and further allow better documentation.&lt;/p&gt;

&lt;p&gt;4) &lt;a href="https://laravel.com/docs/5.6/artisan"&gt;&lt;strong&gt;Artisan&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Laravel comes up with a tool known as Artisan. In general, a developer needs to interact with a Laravel framework with the help of a command line which eventually helps in handling and creating the Laravel project environment.&lt;/p&gt;

&lt;p&gt;A built-in tool is provided in Laravel for command-line which is known as Artisan. The following tools help in performing the majority of this tedious and repetitive programming task which in general the developers avoid performing it manually.&lt;/p&gt;

&lt;p&gt;5) &lt;a href="https://laravel.com/docs/5.6/authorization"&gt;&lt;strong&gt;Authorization technique&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The authentication techniques used by Laravel is quite simple and everything using this can be configured quite naturally. In addition, by the use of Laravel, you can easily control the access to the resources as well as organize authorization logic.&lt;/p&gt;

&lt;p&gt;6) &lt;a href="https://laravel.com/docs/5.6/migrations"&gt;&lt;strong&gt;Database migration&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Database migration is known as code depiction that is taking place in the database schema. The change that takes place in the database can be easily migrated using the migration technique into any other machine. This eventually helps to maintain database consistency.&lt;/p&gt;

&lt;p&gt;7) &lt;a href="https://laravel.com/docs/5.6/pagination"&gt;&lt;strong&gt;Pagination&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The paginator of laravel helps to paginate all the data present in the database and thus provide a user-friendly environment for the developers. Using the Laravel paginator, you can use the large databases in quite an aflexible manner.&lt;/p&gt;

&lt;p&gt;In addition, it also helps in the changing of the URL parameter as well as applying different styles.&lt;/p&gt;

&lt;p&gt;8)  &lt;strong&gt;Easy installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Without the need to install PHP, a pre-packaged vibrant box can be installed quite effortlessly and in a very small time without even interrupting any other projects which might be running on the machine. In addition, it provides a very good development environment and it is certainly quite user-friendly.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automatic package discovery&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the earlier version, it got quite difficult to install the packages. With Laravel, a new feature known as automatic package discovery is added which helps in detecting the packages when it is needed by the user. This certainly means that the users won’t need to set up any provider by setting up the package.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://laravel.com/docs/5.6/blade"&gt;&lt;strong&gt;Blade template&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The blade is the template used in Laravel. It is quite robust and smooth in nature. It doesn’t restrict the users from using the plain PHP code, unlike other frameworks. In addition, it doesn’t possess any burden to the web application. Users can easily pick and use the template whenever required.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Routing configuration&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are using a browser, then the URL routing is quite important as it takes you to the desired link. If it is not performed in the right manner, then the web application may show blank pages or errors. In addition, Laravel holds the routings of the client/server in a very smooth manner.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://laravel.com/docs/5.6/scheduling"&gt;&lt;strong&gt;Programming task management and configuration&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are using a programming task configuration or management, then the time to complete the task is very important. The task can be anything such as clearing the database, sending the email etc. and hence proper management of these tasks are quite important.&lt;/p&gt;

&lt;p&gt;For the following purpose, the framework has a Laravel command scheduler which can help you to define your task. Once the user runs the command, then Laravel can easily schedule the task accordingly as well as run the task which might be pending. In addition, it also schedules as well as manages the task in a quite easy manner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The list of features that have been mentioned above certainly makes Laravel the best framework to use. The features that are offered by the Laravel framework are certainly quite unique when compared with all the other frameworks. In addition, it is quite user-friendly and provides a supported environment for web developers.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2018/07/why-your-next-project-should-be-in-laravel-a-complete-guide/"&gt;Why your next project should be in Laravel?- A complete guide!&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>framework</category>
    </item>
    <item>
      <title>WordPress for Enterprise: Why Your Site Should Use WordPress as CMS</title>
      <dc:creator>Kishore Sahoo</dc:creator>
      <pubDate>Wed, 20 Jun 2018 17:02:55 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/wordpress-for-enterprise-why-your-site-should-use-wordpress-as-cms-5a8g</link>
      <guid>https://dev.to/upnrunnhq/wordpress-for-enterprise-why-your-site-should-use-wordpress-as-cms-5a8g</guid>
      <description>&lt;h4&gt;
  
  
  Introduction
&lt;/h4&gt;

&lt;p&gt;It is seen that if you are having an enterprise business, then you would need to maintain a reliable and scalable web presence so that you can remain competitive towards your business approach. You can think of WordPress as your next CMS.&lt;/p&gt;

&lt;p&gt;If you are building an enterprise website, then you would have to face a lot of challenges. These certainly mean that you would have to look after high traffic, lots of pages, subdomains etc. on the enterprise website.&lt;/p&gt;

&lt;p&gt;In the past, enterprise websites were made using custom solutions. Since the technology has evolved a lot, &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; is being used predominately for making enterprise website.&lt;/p&gt;

&lt;p&gt;In general, users feel that WordPress is generally being used as a blogging platform or for a small-scalebusiness website. But, the matter of fact is that WordPress is a CMS that can be used for businesses of all kinds including the enterprise sector.&lt;/p&gt;

&lt;p&gt;In the points below, we are going to explain how WordPress is a great option for enterprise. Keep reading!!&lt;/p&gt;

&lt;h4&gt;
  
  
  Low cost
&lt;/h4&gt;

&lt;p&gt;Proprietary CMS solutions can cost the users a lot. Moreover, you would have to bedependent on the maker and hence it can dig a hole in your pocket.&lt;/p&gt;

&lt;p&gt;On the contrary, &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; is absolutely free as it is open source which ismaintained by volunteers as well as developers across the globe. So, any user can potentially download it, modify,copy etc. as per the desire.&lt;/p&gt;

&lt;p&gt;Furthermore, using &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; you can have access to free themes and plugins which could prove helpful in enhancing the performance and design of your website. This can indeed help you to save time as well as money in the entire process.&lt;/p&gt;

&lt;h4&gt;
  
  
  Highly reliable
&lt;/h4&gt;

&lt;p&gt;Many people feel that &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; is not reliable for the enterprise website but this is certainly not the case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; is being developed by the best coders, developers, testers etc. on the planet. Moreover, they are being used by the world’s best WordPress companies across the globe.&lt;/p&gt;

&lt;p&gt;In addition, WordPress is being built alongside reputed technologies such as SQL, PHP, and JavaScript. They have proved their effectiveness over the internet for a long period of time.&lt;/p&gt;

&lt;h4&gt;
  
  
  Safe
&lt;/h4&gt;

&lt;p&gt;Safety is one of the primary factors that users are concerned about over the internet. Safety is even more important for high profile organizations.&lt;/p&gt;

&lt;p&gt;WordPress is very secure for enterprise websites thanks to the dedicated team who are collaborated with leading hosting providers.&lt;/p&gt;

&lt;p&gt;The team looks out for all the reported issues as well as publishes security updates if required. They can be appliedautomatically to the existing WordPress installation.&lt;/p&gt;

&lt;p&gt;In addition, the users should follow best security practices so that the website is not compromised.&lt;/p&gt;

&lt;h4&gt;
  
  
  Easy to use
&lt;/h4&gt;

&lt;p&gt;Ease of use is certainly a very important factor that enterprise website owner look out for. WordPress truly stands on their expectation.&lt;/p&gt;

&lt;p&gt;WordPress is considered very user-friendly. A lot of users have started their website on WordPress without having any prior knowledge ofweb technology.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; offers interactive website, multimedia support and different kind of management tools which makes it quite easy to work with.&lt;/p&gt;

&lt;h4&gt;
  
  
  Search Engine friendly
&lt;/h4&gt;

&lt;p&gt;WordPress is a platform which is quite searchengine friendly. It comes up with a lot of standard features such as RSS feeds, custom permalinks, sitemaps, breadcrumbs which makes it search engine friendly.&lt;/p&gt;

&lt;p&gt;In addition, WordPress is equipped with great SEO plugins such as Yoast SEO and ALL IN ONE SEO which makes your SEO campaign very successful.&lt;/p&gt;

&lt;p&gt;Hence, if your goal is to rank your enterprise website on the top of the search engine ranking, then WordPress is the platform that you should look out for.&lt;/p&gt;

&lt;h4&gt;
  
  
  Future proof
&lt;/h4&gt;

&lt;p&gt;A lot of the enterprise website owners are concerned aboutthe fact that if &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; is an idealplatform for long term investment? Well, the answer is yes.&lt;/p&gt;

&lt;p&gt;As per the recent survey, it has been known that the users of WordPress are growing up rapidly each year. Hence, it is quite unlikely that it is going to get abandoned.&lt;/p&gt;

&lt;p&gt;In addition, in the coming time,WordPress is going to get integrated with modern technologies which is a very good sign. Also due &lt;a href="https://developer.wordpress.org/rest-api/"&gt;WP REST API,&lt;/a&gt; we are able to extend it as a SASS application called &lt;a href="https://wpdrift.io/2018/05/28/introduction-to-wpdrift/"&gt;WPdrift.IO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, any investment made on WordPress for enterprise websites is going to be a good investment as well as the choice.&lt;/p&gt;

&lt;h4&gt;
  
  
  Not limited to bloggers
&lt;/h4&gt;

&lt;p&gt;WordPress first began as a blogging website but it has evolved a lot over the years. In the present, it is been widely used to create all types of websites.&lt;/p&gt;

&lt;p&gt;WordPress center of attraction has always been the creation of content but the ability of WordPress is surely expanded beyond just blogging.&lt;/p&gt;

&lt;p&gt;In the current time, using the following platform you can create any type of websites such as business websites, news websites, e-commerce websites as well as enterprise websites.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scalable
&lt;/h4&gt;

&lt;p&gt;Scalability is an important factor that should be looked out for the enterprise website. If the CMS of the website cannot handle the traffic, then it is certainly not suitable for use.&lt;/p&gt;

&lt;p&gt;So, the next question that must be coming toyour mind is that if WordPress has good scalability? Well, the answer is yes.&lt;/p&gt;

&lt;p&gt;WordPress can be used on any kind of hosting environment of any size and kind. It can be used for a singlesite as well as multisite networks.&lt;/p&gt;

&lt;p&gt;A lot of renowned websites are using WordPress as a platform such as &lt;a href="https://techcrunch.com/"&gt;TechCrunch&lt;/a&gt;, &lt;a href="https://www.whitehouse.gov/"&gt;whitehouse.gov&lt;/a&gt;, &lt;a href="https://www.usatoday.com/"&gt;USATODAY.com&lt;/a&gt;  as well as &lt;a href="https://blog.atairbnb.com/"&gt;airbnb&lt;/a&gt;. Hence, with &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; scalability would never be an issue.&lt;/p&gt;

&lt;h4&gt;
  
  
  Flexible and expandable
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; platform has 50,000+ themes as well as several themes available to be accessed.&lt;/p&gt;

&lt;p&gt;So, whatever be the requirement of your enterprise website, WordPress platform is certainly going to have a solution for it.&lt;/p&gt;

&lt;p&gt;In a scenario where the solution is not available, then an experienceddeveloper will create a solution for you due to the open source nature of this platform.&lt;/p&gt;

&lt;p&gt;In addition, you can also integrate third-party websites with WordPress websites using wide range of &lt;a href="https://upnrunn.com/blog/2018/02/extend-wp-rest-api-custom-plugin-part-1/"&gt;APIs&lt;/a&gt;that are available on the platform.&lt;/p&gt;

&lt;p&gt;Moreover, it is been used globally due to the fact that it supports multiple languages which includes the time, currency formats as well as date.&lt;/p&gt;

&lt;h4&gt;
  
  
  Final verdict
&lt;/h4&gt;

&lt;p&gt;The use of &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; for enterprise websites is becoming very common these days. The platform easily adapts to the requirement of the complexas well as large-scale websites.&lt;/p&gt;

&lt;p&gt;Moreover, it is very secure, reliable and scalable and potentially stands on the requirement of the enterprise clients. In addition, it is absolutely free of cost to use which makes it stand out from the other crowd.&lt;/p&gt;

&lt;p&gt;The demand is going to increase in the future and hence a lot of enterprise websites would be built on &lt;a href="https://wordpress.org/"&gt;WordPress&lt;/a&gt; as the CMS. Don’t hold back! Get your enterprise website today!!&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2018/06/wordpress-for-enterprise/"&gt;WordPress for Enterprise: Why Your Site Should Use WordPress as CMS&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>blog</category>
      <category>cms</category>
      <category>wordpress</category>
    </item>
    <item>
      <title>How To Extend WP REST API From Your Custom Plugin: Part 3</title>
      <dc:creator>Mithun Biswas</dc:creator>
      <pubDate>Wed, 11 Apr 2018 14:09:47 +0000</pubDate>
      <link>https://dev.to/upnrunnhq/how-to-extend-wp-rest-api-from-your-custom-plugin-part-3-24m2</link>
      <guid>https://dev.to/upnrunnhq/how-to-extend-wp-rest-api-from-your-custom-plugin-part-3-24m2</guid>
      <description>&lt;p&gt;&lt;strong&gt;This is article 3 of 5 in the series “How To Extend WP REST API From Your Custom Plugin”&lt;/strong&gt;. In case you missed the previous tutorials check the list below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://upnrunn.com/blog/2018/02/extend-wp-rest-api-custom-plugin-part-1/"&gt;How To Extend WP REST API From Your Custom Plugin (Part 1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://upnrunn.com/blog/2018/02/extend-wp-rest-api-custom-plugin-part-2/"&gt;How To Extend WP REST API From Your Custom Plugin (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the previous tutorials, we have created a basic plugin where we can write our code and learned how to extend REST API by modifying responses.&lt;/p&gt;

&lt;p&gt;WordPress REST API has default routes and endpoints. It also allows developers to add custom routes and endpoints. That’s great. In this tutorial, we will learn how to add custom endpoints.&lt;/p&gt;

&lt;p&gt;Recently, we have released a plugin called &lt;a href="https://wordpress.org/plugins/wp-restaurant-listings/"&gt;WP Restaurant Listings&lt;/a&gt; which you can use to add restaurant listing functionality to your WordPress site. This plugin doesn’t have builtin custom endpoints to access your restaurant site’s data through WP REST API. So, We are going to add custom endpoints in our plugin to access data by sending HTTP request easily.&lt;/p&gt;

&lt;p&gt;We will use the controller pattern, so we can organize our code easily. You can learn more about the &lt;a href="https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/#the-controller-pattern"&gt;controller pattern here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First, create a file called &lt;code&gt;class-rest-tutorial-restaurant-endpoint.php&lt;/code&gt; inside the &lt;code&gt;includes&lt;/code&gt; folder of the plugin we created in the previous tutorials with the following content.&lt;/p&gt;

&lt;p&gt;We did not register the route yet. To register the new route we will use the &lt;code&gt;register_rest_route&lt;/code&gt; function. We will pass in three parameters: the namespace, the route we want, and the options (an array of arrays for multiple methods) to this function. Inside the &lt;code&gt;register_routes method&lt;/code&gt;, let’s add the following code.&lt;/p&gt;

&lt;p&gt;We are using WP_REST_Server constants to set the method, it a common practice. So we are using WP_REST_Server::READABLE to set the method to ‘GET’. When users send ‘GET’ request to the registered route &lt;code&gt;get_items&lt;/code&gt; method of the class will be called. Let’s add that method.&lt;/p&gt;

&lt;p&gt;We also need to add &lt;code&gt;get_items_permissions_check&lt;/code&gt; method. To make restaurants readable by all users we need to make sure that &lt;code&gt;get_items_permissions_check&lt;/code&gt; return true.&lt;/p&gt;

&lt;p&gt;Next, we are going to add a method which will return an array of parameters. Our newly registered route will accept these parameters when sending ‘GET’ request to WP REST API.&lt;/p&gt;

&lt;p&gt;Finally, we need to add another method which will prepare restaurant data and return as an object.&lt;/p&gt;

&lt;p&gt;Now, our class &lt;code&gt;REST_TUTORIAL_Restaurnt_Endpoint&lt;/code&gt; is ready to do some cool things. We did not include this class yet, so we need to include it first. Add the following code inside the &lt;code&gt;rest-api-tutorial.php&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;We are checking if the &lt;a href="https://wordpress.org/plugins/wp-restaurant-listings/"&gt;WP_Restaurant_Listings&lt;/a&gt; plugin is installed or not. If the the plugin is not installed and active we will not include the &lt;code&gt;REST_TUTORIAL_Restaurnt_Endpoint&lt;/code&gt; class. So, it is required to install and activate &lt;a href="https://wordpress.org/plugins/wp-restaurant-listings/"&gt;WP_Restaurant_Listings&lt;/a&gt; plugin to make it work.&lt;/p&gt;

&lt;p&gt;We did an awesome job. Now if we send “GET’ request to &lt;code&gt;wp-json/rest-tutorial/v1/restaurants&lt;/code&gt; we will get the restaurants in simple JSON format as pictured below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RznA1JvK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/upnrunn.com/wp-content/uploads/2018/04/restaurants_data.png%3Fresize%3D1130%252C602%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RznA1JvK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/upnrunn.com/wp-content/uploads/2018/04/restaurants_data.png%3Fresize%3D1130%252C602%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, we can register another route to get single restaurant item. We’re going to have the route match anything with &lt;code&gt;/restaurants/{id}&lt;/code&gt;, where {id} is an integer. Check the following code.&lt;/p&gt;

&lt;p&gt;We are using the &lt;code&gt;get_items_permissions_check&lt;/code&gt; again to make restaurant readable by all users. Now, it’s time to retrieve the restaurant by adding the &lt;code&gt;get_item&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;Now, you can now easily get a restaurant data by sending HTTP “GET” request to &lt;code&gt;wp-json/rest-tutorial/v1/restaurants/{id}&lt;/code&gt; endpoint.&lt;/p&gt;

&lt;p&gt;In the next tutorials, I will show you how to register route with POST, PUT, DELETE methods to update or delete a restaurant.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://upnrunn.com/blog/2018/04/how-to-extend-wp-rest-api-from-your-custom-plugin-part-3/"&gt;How To Extend WP REST API From Your Custom Plugin: Part 3&lt;/a&gt; appeared first on &lt;a href="https://upnrunn.com"&gt;upnrunn® | Build &amp;amp; Deploy Powerful Application&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>blog</category>
    </item>
  </channel>
</rss>
