<?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: sumyya khan</title>
    <description>The latest articles on DEV Community by sumyya khan (@sumyya_khan).</description>
    <link>https://dev.to/sumyya_khan</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%2Fuser%2Fprofile_image%2F795259%2Fd45c32e0-8af2-47d5-ad82-4627e649206a.jpg</url>
      <title>DEV Community: sumyya khan</title>
      <link>https://dev.to/sumyya_khan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sumyya_khan"/>
    <language>en</language>
    <item>
      <title>7 Latest Tips about Laravel Eloquent that you Must Need to Know</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Wed, 12 Oct 2022 06:25:23 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/7-latest-tipsabout-laravel-eloquent-that-you-must-need-to-know-4gi4</link>
      <guid>https://dev.to/sumyya_khan/7-latest-tipsabout-laravel-eloquent-that-you-must-need-to-know-4gi4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Laravel&lt;/strong&gt; includes Eloquent, an object-relational mapper (ORM) that makes it pleasant to interact with your database. Eloquent ORM seems like a simple mechanism, but under the hood, there’s a lot of semi-hidden functions and less-known ways to achieve more with it. In this article, I will show you some latest tips and tricks related to Laravel Eloquent and DB Models.&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Where Clauses
&lt;/h3&gt;

&lt;p&gt;Laravel offers helpers to query JSON columns for databases that support them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Currently, MySQL 5.7+, PostgreSQL, SQL Server 2016, and SQLite 3.9.0 (using the JSON1 extension)
// To query a json column you can use the -&amp;gt; operator
$users = User::query()
            -&amp;gt;where('preferences-&amp;gt;dining-&amp;gt;meal', 'salad')
            -&amp;gt;get();
// You can check if a JSON array contains a set of values
$users = User::query()
            -&amp;gt;whereJsonContains('options-&amp;gt;languages', [
                'en', 'de'
               ])
            -&amp;gt;get();
// You can also query by the length of a JSON array
$users = User::query()
            -&amp;gt;whereJsonLength('options-&amp;gt;languages', '&amp;gt;', 1)
            -&amp;gt;get();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Chain conditional clauses to the query without writing if-else statements
&lt;/h3&gt;

&lt;p&gt;The "when" helper in the query builder is 🔥&lt;br&gt;
You can chain conditional clauses to the query without writing &lt;code&gt;if-else&lt;/code&gt; statements.&lt;br&gt;
This makes your query very clear:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class RatingSorter extends Sorter
{
    function execute(Builder $query)
    {
        $query
            -&amp;gt;selectRaw('AVG(product_ratings.rating) AS avg_rating')
            -&amp;gt;join('product_ratings', 'products.id', '=', 'product_ratings.product_id')
            -&amp;gt;groupBy('products.id');
            -&amp;gt;when(
                $this-&amp;gt;direction === SortDirections::Desc,
                fn () =&amp;gt; $query-&amp;gt;orderByDesc('avg_rating')
                fn () =&amp;gt; $query-&amp;gt;orderBy('avg_rating'),
            );

        return $query;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Get all the column names for a table
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB::getSchemaBuilder()-&amp;gt;getColumnListing('users');
/*
returns [
    'id',
    'name',
    'email',
    'email_verified_at',
    'password',
    'remember_token',
    'created_at',
    'updated_at',
]; 
*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Accessor Caching
&lt;/h3&gt;

&lt;p&gt;As of Laravel 9.6, if you have a computationally intensive accessor, you can use the &lt;code&gt;shouldCache&lt;/code&gt; method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function hash(): Attribute
{
    return Attribute::make(
        get: fn($value) =&amp;gt; bcrypt(gzuncompress($value)),
    )-&amp;gt;shouldCache();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  New scalar() method
&lt;/h3&gt;

&lt;p&gt;In Laravel 9.8.0, the &lt;code&gt;scalar()&lt;/code&gt; method was added that allows you to retrieve the first column of the first row from the query result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Before
DB::selectOne("SELECT COUNT(CASE WHEN food = 'burger' THEN 1 END) AS burgers FROM menu_items;")-&amp;gt;burgers
// Now
DB::scalar("SELECT COUNT(CASE WHEN food = 'burger' THEN 1 END) FROM menu_items;")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Select specific columns
&lt;/h3&gt;

&lt;p&gt;To select specific columns on a model you can use the select method -- or you can pass an array directly to the get method!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Select specified columns from all employees
$employees = Employee::select(['name', 'title', 'email'])-&amp;gt;get();
// Select specified columns from all employees
$employees = Employee::get(['name', 'title', 'email']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Compare the values of two columns
&lt;/h3&gt;

&lt;p&gt;You can use &lt;code&gt;whereColumn&lt;/code&gt; method to compare the values of two columns.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return Task::whereColumn('created_at', 'updated_at')-&amp;gt;get();
// pass a comparison operator
return Task::whereColumn('created_at', '&amp;gt;', 'updated_at')-&amp;gt;get();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Eloquent has many excellent functionalities, which I explained above. I hope you will find them helpful and implement them in your Laravel Projects. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow Us on Twitter:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamSumyyaKhan"&gt;https://twitter.com/iamSumyyaKhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;[&lt;a href="https://twitter.com/CodeBrisk%5D(https://tw"&gt;https://twitter.com/CodeBrisk](https://tw&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>6 Reasons Why You Need to Build your Web App with REST API</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Mon, 25 Jul 2022 07:38:14 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/6-reasons-why-you-need-to-build-your-web-app-with-rest-api-15d1</link>
      <guid>https://dev.to/sumyya_khan/6-reasons-why-you-need-to-build-your-web-app-with-rest-api-15d1</guid>
      <description>&lt;p&gt;RESTful APIs are the widely used APIs in the world of web development. RESTful APIs use Hypertext Transfer Protocol (HTTP) requests to create, read, update, and delete (CRUD) data. They are popular because of their clarity, scalability, speed, and ability to handle all data types. The use of REST APIs has grown exponentially over the years and, today, many developers use these APIs for critical projects.   &lt;/p&gt;

&lt;p&gt;This blog highlights the important elements of RESTful APIs web development as well as its benefits for web application development. &lt;/p&gt;

&lt;h4&gt;
  
  
  Lightweight
&lt;/h4&gt;

&lt;p&gt;One of the main advantages of REST APIs is that they depend on the HTTP standard, which indicates it is format-agonistic and you can utilize XML, JSON, HTML, etc. This makes REST APIs fast, and lightweight which is crucial for mobile app projects, internet of things devices, and more. &lt;/p&gt;

&lt;h4&gt;
  
  
  Scalability
&lt;/h4&gt;

&lt;p&gt;Scalability means how many users can access your application simultaneously without facing system failures. So the REST APIs stand out due to their scalability. REST APIs are lightweight, in response APIs only send raw data in JSON or XML format. Let's say you have a sales management application and your team extended from 20 to 2000. With REST API, you can fulfill this demand without having to spend on a bigger resources pool.&lt;/p&gt;

&lt;h4&gt;
  
  
  Flexibility &amp;amp; Portability.
&lt;/h4&gt;

&lt;p&gt;REST API's are very flexible and portable. The REST protocol separates the data storage and the UI from the server. This means that developers can work on different areas of a project independently and try out multiple developer environments as needed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Independence
&lt;/h4&gt;

&lt;p&gt;Another benefit of REST APIs is that the client and server are independent. With the separation between client and server, the protocol makes it easy for developments across a project to take place independently. In addition, the REST API adapts at all times to the working syntax and platform. This offers the opportunity to use multiple environments while developing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Low Cost
&lt;/h4&gt;

&lt;p&gt;If you are going with REST APIs then it will bring considerable cost benefits. They offer scalability without having to invest in costly hardware. You can save time due to more satisfactory performance, save cost by sustaining multi-platforms and enable better collaboration between teams.&lt;/p&gt;

&lt;h4&gt;
  
  
  A Universal Platform
&lt;/h4&gt;

&lt;p&gt;Modern applications are mostly served on a wide range of devices like web browsers, mobile phones, tablets, and desktop clients. Having a mobile app for your application is no more a luxury, it's a must now. Employees want the information whenever and wherever they need it. So if you want to target the current devices and keep options open for the future, then REST API is the most suitable option because it separates the front-end from the application back-end.&lt;/p&gt;

&lt;p&gt;Above we highlighted the common benefits of REST API but the benefits don’t stop there. REST APIs are also efficient, high-performing, consume less bandwidth, and are cost-effective because developers can use them without third-party tools.&lt;/p&gt;

&lt;h4&gt;
  
  
  Closing Notes
&lt;/h4&gt;

&lt;p&gt;If you have a great idea about website development then Codebrisk is always here to convert your ideas into reality. For further assistance, please &lt;a href="https://codebrisk.com/contact-us"&gt;contact us&lt;/a&gt; or you can &lt;a href="https://codebrisk.com/launch-your-project"&gt;launch a project&lt;/a&gt; with us.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow Us on Twitter:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamSumyyaKhan"&gt;https://twitter.com/iamSumyyaKhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/CodeBrisk"&gt;https://twitter.com/CodeBrisk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>api</category>
      <category>laravel</category>
      <category>webdev</category>
      <category>php</category>
    </item>
    <item>
      <title>Why you should prefer Custom SAAS Application for your Business?</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Tue, 14 Jun 2022 10:10:01 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/why-you-should-prefer-custom-saas-application-for-your-business-4485</link>
      <guid>https://dev.to/sumyya_khan/why-you-should-prefer-custom-saas-application-for-your-business-4485</guid>
      <description>&lt;p&gt;We can't visualize a business world where SaaS applications are not playing an important role. As you know that SaaS is a long-term approach for businesses reserved for helping their customers with best-in-class service and products. Yet, many enterprises are hesitant about the feasibility of the SaaS model in their business. They might not be confident that choosing a SAAS Application is best for their business. Whether you are thinking about the idea of using the SaaS Application or if you are not considering it at all, You have to read this post. It will hopefully help you decide.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Choose Software as a Service (SASS)
&lt;/h3&gt;

&lt;p&gt;Software as a service (or SaaS) is a way of providing applications over the Internet—as a service. Rather than installing and maintaining software, you can simply access it via the Internet and liberate yourself from complex software and hardware management. SaaS is one of the most popular types of cloud computing.  SaaS applications are sometimes called Web-based software, on-demand software, or hosted software. Whatever the name, SaaS applications run on a SaaS provider’s servers. The provider controls access to the application, including security, availability, and performance.&lt;/p&gt;

&lt;p&gt;Custom SAAS solutions offer businesses the ability to scale, backup, and recover their data from the cloud and increase their safety.&lt;br&gt;
Zoom, Hubspot, Shopify, Office365, Google Photos, Gmail, Google Docs, Google Sheets, Google Drive, etc are the most famous examples of SAAS.&lt;br&gt;
Any company can benefit from the SaaS application as it offers a low-cost option, a lenient, and easy-to-maintain option for executing a business strategy.&lt;/p&gt;

&lt;h3&gt;
  
  
  5 Benefits of Custom SAAS Web Development
&lt;/h3&gt;

&lt;p&gt;Let’s list the primary advantages of Custom SAAS Web Development which may be useful for an entrepreneur to make a knowledgeable decision regarding the choice of software for his company.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rapidly Scaling Over Time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Creating a custom SaaS software solution also directs to effortless scalability. Mostly Businesses grow over time and may need new software licenses, and server space or they need to add new users. With SaaS, making these changes is as simple as upgrading the existing plan or subscription for the application.&lt;br&gt;
SaaS offers businesses the ease to scale their applications up or down based on their individual needs. These Businesses can also change their usage plan with their vendor without giving any advance notice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost-Effective&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developing a custom SaaS application can result in substantial savings for businesses. Software-as-a-service reduces the upfront costs associated with the purchase and installation of traditional software. In addition, businesses can also save on ongoing costs such as upgrades and maintenance. SaaS is both downloadable and virtually maintenance-free. That's why the SaaS application proves to be much cheaper in the long run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick Backup  &amp;amp; Data Recovery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you are using a SaaS application, a business’s IT infrastructure and data are safely installed and stored in cloud storage in a remote location. This means that even if something goes wrong with your servers, you can always go back to the previous savings with the backup log and get access to information from any device with an internet connection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;High Security&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another big advantage of creating a custom SaaS solution is the evolved security measures. SaaS applications offer businesses an incredibly safe platform where they can confidently store valuable business data.&lt;/p&gt;

&lt;p&gt;SaaS is considered to be even more protected than traditional data storage methods. With custom SaaS solutions, platforms, servers, applications, and data are proactively protected and managed by data security specialists. Outsourcing to a cloud provider that is an expert in IT security can give businesses peace of mind that their data is safe.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-device Compatibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SaaS application development is very useful for enterprises in any industry. SaaS applications are straightforward to access by utilizing an internet-enabled device that will be more perfect for operating on various devices, like internet-enabled tablets and phones, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow Us on Twitter:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamSumyyaKhan"&gt;https://twitter.com/iamSumyyaKhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/CodeBrisk"&gt;https://twitter.com/CodeBrisk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>startup</category>
      <category>laravel</category>
    </item>
    <item>
      <title>The Benefits of Custom CRM Software Development</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Thu, 09 Jun 2022 07:01:01 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/the-benefits-of-custom-crm-software-development-555j</link>
      <guid>https://dev.to/sumyya_khan/the-benefits-of-custom-crm-software-development-555j</guid>
      <description>&lt;p&gt;CRM stands for Customer Relations Management. It is a software product type allowing for automated collection and processing of various data that your customers submit on your website. CRM is one of the world’s fastest-growing industries, expected to grow at a rate of 14% between 2021 and 2027. For those who work with a CRM platform, it’s challenging to imagine a world without it. CRM software can gather customer interactions in one central place to improve customer experience and satisfaction. CRM software has become an essential tool for businesses of all sizes. It can provide several benefits to any business, from organizing contacts to automating key tasks. It can also be an organized hub that allows constant communication both with customers and within the organization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Custom CRM Software Development
&lt;/h3&gt;

&lt;p&gt;A Custom CRM solution can be used in different ways and provide multiple perks to your business. These are some benefits of CRM software listed below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improve Customer Relationship&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Custom CRM software gives you the ability to store, manage, and efficiently track customer data. Given that your company’s existing customers are its most precious resource, it is important that they covert into loyal customers who promote your brand. With a CRM solution built specifically for your needs, you stand well-equipped to better understand your customers’ habits, needs, and preferences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increase Efficiency&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you opt for customized CRM software, you get the ability to assign specific dashboards for specific employees and departments. This means employees only get to view what’s essential for their jobs. Such a platform also streamlines integration between sales and marketing teams, giving both access to relevant data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated Reports&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your team can easily collect and organize data about prospective and current customers using the CRM software’s dashboard and reporting features, which allow employees to automate and manage their pipelines and processes. The CRM can also help your team members evaluate their performance, track their quotas and goals, and check their progress on each of their projects at a glance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Save Time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Work gets done faster when you have easy access to all the information you need. With role-specific dashboards, you guarantee that all the information your employees need is accessible through a single platform. Besides, you can also get your custom CRM solution to carry out repetitive tasks automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increase Sales&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Boosting sales is the last frontier of any business, and custom CRM software works toward this objective in many ways. A boost in brand loyalty has a direct effect on this aspect. Since you get the ability to analyze customer data in the right manner, you may develop appropriate marketing strategies to increase conversion. An increase in sales is bound to follow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Note
&lt;/h3&gt;

&lt;p&gt;If you want to build a CRM system or eCommerce web application for your business, then Codebrisk is here to help you. Our CRM development with Laravel holds a wide range of features for entities to manage their interactions with customers. We create modules for collecting data, product status details, and launching email and social media campaigns with features such as Laravel Socialite which supports authentication with various social media platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow Us on Twitter:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamSumyyaKhan"&gt;https://twitter.com/iamSumyyaKhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/CodeBrisk"&gt;https://twitter.com/CodeBrisk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>webdev</category>
      <category>crm</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why You Need to Build Your Next Single Page Application with Vue Js</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Fri, 13 May 2022 09:27:00 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/why-you-need-to-build-your-next-single-page-application-with-vue-js-247f</link>
      <guid>https://dev.to/sumyya_khan/why-you-need-to-build-your-next-single-page-application-with-vue-js-247f</guid>
      <description>&lt;p&gt;Nowadays, many companies have started to construct their web applications employing a growing web design approach referred to as Single Page applications. The Internet is loaded with SPA examples. Some of them you use regularly like Netflix, Google Drive, Facebook, Gmail, Google Maps, Trello, Twitter, etc.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;SPA&lt;/strong&gt; (single-page application), is a web application that is simply composed of just one web page, a single file on the filesystem, such as index.html. A SPA generally downloads the initial application code (HTML, CSS, and JavaScript) from the server-side, and the subsequent resources are dynamically loaded to the page, usually in response to user actions. Requests for different “pages” (or “views”) are handled through AJAX (JavaScript) and replace parts of the page, potentially saving on bandwidth. This method decreases the time required to switch between pages and different parts of the application by eliminating the need to continually download parts of the single-page app, like the template, which doesn't often change.&lt;/p&gt;

&lt;p&gt;Additionally, through the use of the browser's History API, the URL in the address bar can be changed with each page. Because of this, the browser history will act just like it does on a traditional website. This permits you to utilize the forward and backward arrows to go back and forth between pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Vue Js
&lt;/h3&gt;

&lt;p&gt;Vue.js has become one of the greatest frameworks for building single-page applications. It abstracts away much of the complexity normally involved in building web applications. Also, it has been well integrated with many other frameworks, such as the Laravel PHP framework. &lt;/p&gt;

&lt;p&gt;Vue js is developed by Evan You in 2013, Vue.js is a progressive, declarative JavaScript framework for building fast single-page applications. It is progressive because it can easily scale from a library to a full-featured framework. Vue proposes an adaptable ecosystem that can scale between a library and a full-featured framework. &lt;/p&gt;

&lt;h3&gt;
  
  
  Vue js and other Frameworks
&lt;/h3&gt;

&lt;p&gt;React, Angular.js, Ember.js, and Vue.js are some of the most famous front-end web frameworks in use today. All these frameworks share a similar perspective and purpose. Each one offers specific advantages and limitations over the others, but Vue.js is popular for being an ideal middle ground.  It offers more tools than React but fewer than Angular. On top of that, the syntax of Vue.js is simpler.  On top of that, the syntax of Vue.js is simpler. Vue.js also offers built-in state management and vue-router, the official Vue.js router. However, it does not feature HTTP client functionality or form validation. Vue focuses on building user interfaces and creating reusable components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of using Vue Js
&lt;/h3&gt;

&lt;p&gt;So let’s look at the Benefits of the Vuejs framework that makes it a good choice for your business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Component-based architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like Angular and React, the Vue js framework follows a component-based architecture. This means all the frontend application code can be divided into independent components.&lt;br&gt;
These components, consisting of template, logic, and styles, are bound together to form the web app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reusability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The component-based approach of Vue enables the formation of reusable single file components. Inside a component, template, logic, and styles are inherently coupled. Instead of separating the code into arbitrary layers, Vue assembles components that can be reused and into a function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Future Maintenance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is the responsibility of the developers to ensure that the app performs bug-free and is updated after the initial release. Vue.js helps you manage maintenance and updates easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Virtual-DOM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vue js uses a virtual representation of the actual DOM of a webpage, created using Javascript objects. Thus the DOM objects can easily be rendered without modifying and refreshing the whole tree every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code readability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As all the components are stored in separate files (and each component is just a single file), the code is easier to read and understand, which makes it easier to maintain and fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;High performance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vue js framework is very lightweight, bundling around 18kb - 20kb. But it doesn’t compromise on performance or productivity. It is one of the fastest frameworks available for building web interfaces. Vue js is lightning-fast to install and you can start working in a matter of minutes. Plus, the high page loading time also positively affects your web pages’ SEO ranking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reactive two-way data binding&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another benefit in DOM manipulations is two-way data binding inherited by Vue from Angular. In Vue, the bound data is updated reactively as are DOM objects, which is excellent for any application requiring real-time updates. Vue’s reactivity will make data updating clearer and easier to complete. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Notes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Being a custom web development company, Codebrisk has proven experience in developing single-page web applications for companies of any size. At Codebrisk, our expert developers utilize Vue js for building Single Page Applications. So if you need Single Page Application development, We are here for you to assist with this initiative. You can &lt;a href="https://codebrisk.com/contact-us"&gt;contact us&lt;/a&gt; for any suggestion about the development of an interactive, dynamic single-page application for your enterprise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow Us on Twitter:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamSumyyaKhan"&gt;https://twitter.com/iamSumyyaKhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/CodeBrisk"&gt;https://twitter.com/CodeBrisk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>vue</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Latest Tips &amp; Tricks About Laravel Validation &amp; Laravel Routing</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Wed, 27 Apr 2022 07:26:33 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/latest-tips-tricks-about-laravel-validation-laravel-routing-2jec</link>
      <guid>https://dev.to/sumyya_khan/latest-tips-tricks-about-laravel-validation-laravel-routing-2jec</guid>
      <description>&lt;p&gt;Laravel is an open-source PHP framework devised to make developing web apps easier and faster through built-in features. These features are part of what makes Laravel so widely used by web developers.&lt;br&gt;
Laravel includes a wide variety of beneficial validation rules that you can apply to data, even providing the ability to validate if values are unique in a given database table. Routing in Laravel allows you to route all your application requests to their appropriate controller. In this article, I will show you some laravel validation and routing tips. Hopefully, you can use them to supercharge your Laravel applications. Here we go!&lt;/p&gt;
&lt;h4&gt;
  
  
  Position placeholder in the validation messages
&lt;/h4&gt;

&lt;p&gt;In Laravel 9 you can use the &lt;code&gt;:position&lt;/code&gt; placeholder in the validation messages if you're working with arrays.&lt;/p&gt;

&lt;p&gt;This will output: "Please provide an amount for price #2"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CreateProductRequest extends FormRequest
{
    public function rules(): array
    {
        return  [
            'title' =&amp;gt; ['required', 'string'];
            'description' =&amp;gt; ['nullable', 'sometimes', 'string'],
            'prices' =&amp;gt; ['required', 'array'],
            'prices.*.amount' =&amp;gt; ['required', 'numeric'],
            'prices.*.expired_at' =&amp;gt; ['required', 'date'],
        ];
    }

    public function messages(): array
    {
        'prices.*.amount.required' =&amp;gt; 'Please provide an amount for price #:position'
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  New array validation rule required_array_keys
&lt;/h4&gt;

&lt;p&gt;Laravel 8.82 adds a &lt;code&gt;required_array_keys&lt;/code&gt; validation rule. The rule checks that all of the specified keys exist in an array.&lt;/p&gt;

&lt;p&gt;Valid data that would pass the validation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$data = [
    'baz' =&amp;gt; [
        'foo' =&amp;gt; 'bar',
        'fee' =&amp;gt; 'faa',
        'laa' =&amp;gt; 'lee'
    ],
];

$rules = [
    'baz' =&amp;gt; [
        'array',
        'required_array_keys:foo,fee,laa',
    ],
];

$validator = Validator::make($data, $rules);
$validator-&amp;gt;passes(); // true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Invalid data that would fail the validation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$data = [
    'baz' =&amp;gt; [
        'foo' =&amp;gt; 'bar',
        'fee' =&amp;gt; 'faa',
    ],
];

$rules = [
    'baz' =&amp;gt; [
        'array',
        'required_array_keys:foo,fee,laa',
    ],
];

$validator = Validator::make($data, $rules);
$validator-&amp;gt;passes(); // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Route resources grouping
&lt;/h4&gt;

&lt;p&gt;If your routes have a lot of resource controllers, you can group them and call one &lt;code&gt;Route::resources()&lt;/code&gt; instead of many single &lt;code&gt;Route::resource()&lt;/code&gt; statements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Route::resources([
    'photos' =&amp;gt; PhotoController::class,
    'posts' =&amp;gt; PostController::class,
]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Custom route bindings
&lt;/h4&gt;

&lt;p&gt;Did you know you can define custom route bindings in Laravel?&lt;/p&gt;

&lt;p&gt;In this example, I need to resolve a portfolio by slug. But the slug is not unique, because multiple users can have a portfolio named &lt;code&gt;Foo&lt;/code&gt;. So I define how Laravel should resolve them from a route parameter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class RouteServiceProvider extends ServiceProvider
{
    public const HOME = '/dashboard';

    public function boot()
    {
        Route::bind('portfolio', function (string $slug) {
            return Portfolio::query()
                -&amp;gt;whereBelongsto(request()-&amp;gt;user())
                -&amp;gt;whereSlug($slug)
                -&amp;gt;firstOrFail();
        });
    }
}
Route::get('portfolios/{portfolio}', function (Portfolio $portfolio) {
    /*
     * The $portfolio will be the result of the query defined in the RouteServiceProvider
     */
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Mac validation rule
&lt;/h4&gt;

&lt;p&gt;New mac_address validation rule added in Laravel 8.77&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$trans = $this-&amp;gt;getIlluminateArrayTranslator();
$validator = new Validator($trans, ['mac' =&amp;gt; '01-23-45-67-89-ab'], ['mac' =&amp;gt; 'mac_address']);
$this-&amp;gt;assertTrue($validator-&amp;gt;passes());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Validate email with TLD domain required
&lt;/h4&gt;

&lt;p&gt;By default, the email validation rule will accept an &lt;code&gt;email&lt;/code&gt; without a TLD domain (ie: &lt;code&gt;taylor@laravel&lt;/code&gt;, &lt;code&gt;povilas@ldaily&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;But if you want to make sure the email must have a TLD domain (ie: &lt;code&gt;&lt;a href="mailto:taylor@laravel.com"&gt;taylor@laravel.com&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;a href="mailto:povilas@ldaily.com"&gt;povilas@ldaily.com&lt;/a&gt;&lt;/code&gt;), use the &lt;code&gt;email:filter&lt;/code&gt; rule.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
    'email' =&amp;gt; 'required|email', // before
    'email' =&amp;gt; 'required|email:filter', // after
],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Route view
&lt;/h4&gt;

&lt;p&gt;You can use &lt;code&gt;Route::view($uri , $bladePage)&lt;/code&gt; to return a view directly, without having to use the controller function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//this will return home.blade.php view
Route::view('/home', 'home');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are some useful tips and tricks related to laravel Validation &amp;amp; Routing. I hope that by utilizing these tips, you will improve your code execution and usability. If you love them, then please follow us for more laravel &amp;amp; Vue js related news.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow Us on Twitter:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamSumyyaKhan"&gt;https://twitter.com/iamSumyyaKhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/CodeBrisk"&gt;https://twitter.com/CodeBrisk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>vue</category>
      <category>programming</category>
      <category>php</category>
    </item>
    <item>
      <title>Cons &amp; Pros of Single Page Application &amp; Multi Page Application</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Mon, 11 Apr 2022 06:28:50 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/cons-procs-of-single-page-application-multi-page-application-4onk</link>
      <guid>https://dev.to/sumyya_khan/cons-procs-of-single-page-application-multi-page-application-4onk</guid>
      <description>&lt;p&gt;To guarantee your web app runs without any unwelcome interactions, it has to be supported by the right technology to certify high performance and speed. So if you are hunting for the best technique for creating a website, you’ll definitely encounter two prominent approaches and you will have to pick between MPAs (Multi-page applications) and SPAs (Single-page applications).  If you’re skeptical about which one to go with, keep on reading to determine which one is the best choice for your next web application. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Single-Page Application (SPA)?
&lt;/h3&gt;

&lt;p&gt;Single-page applications entitle you to simulate the work of desktop apps. The architecture is organized in such a way that when you go to a new page, only a part of the content is updated. Thus, there is no need to re-download the same elements. This is very convenient for developers and users. The Internet is filled with SPA examples. Some of them you utilize regularly like Netflix, Facebook, Gmail, Google Maps, Trello, Twitter, etc.&lt;/p&gt;

&lt;p&gt;Single Page Applications utilize AJAX and HTML5. JS frameworks (React, Angular, Vue, and Ember) are responsible for processing the heavy challenges on the client-side for SPAs. Such apps allow users to stay in one comfy web space and provide them with the best user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of SPA
&lt;/h3&gt;

&lt;p&gt;Here are the main benefits of the  Single Page Application approach. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed &amp;amp; Performance:&lt;/strong&gt;  Since SPA doesn't update the entire page, but only the necessary part, it significantly improves the speed of work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick development:&lt;/strong&gt;  Ready-made libraries and frameworks provide powerful tools for developing web applications. The project can work in parallel with back-end and front-end developers. Thanks to a clear separation they will not interfere with each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mobile applications:&lt;/strong&gt; SPA allows you to easily develop mobile apps based on the finished code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coupling:&lt;/strong&gt; SPA is strongly decoupled, meaning that the front-end and back-end are separate. Single-page applications use APIs developed by server-side developers to read and display data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Drawbacks of SPA
&lt;/h3&gt;

&lt;p&gt;Here are some drawbacks of the  Single Page Application approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Poor SEO:&lt;/strong&gt;  SPA operates based on javascript and it downloads information on request from the client part. Search engines can barely simulate this behavior. Because most of the pages are simply not available for scanning by search bots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Troubles with security:&lt;/strong&gt;  Spa is more vulnerable to cross-site scripting attacks. Due to XSS, hackers can insert their own client-side script into web apps. However, it can be controlled by the means of securing data endpoints.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Multi-Page Application (MPA)?
&lt;/h3&gt;

&lt;p&gt;An MPA is a web app that includes more than one page and needs to reload the entire page. It is a preferred choice for big companies with large product portfolios, such as e-commerce businesses. If you are looking for examples, just think about Amazon, eBay, Aliexpres, or any other complex site with multiple pages.&lt;br&gt;
Multi-Page Applications operate traditionally. They are quite large out of necessity. MPAs usually consists of a big amount of content so they generally have many levels and various links. &lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of MPA
&lt;/h3&gt;

&lt;p&gt;Here are the main benefits of the  Multiple Page Application approach. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy SEO optimization:&lt;/strong&gt;  MPA allows better website positioning, as each page can be optimized for a different keyword. Also, meta tags can be added on every page which positively affects the Google rankings. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Great Scalability:&lt;/strong&gt; Mpa offers great scalability. This means that no matter how much content you require your app to include, there will be no limits. MPAs facilitate adding an unlimited number of new features, product pages, information about services, and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solutions &amp;amp; Frameworks:&lt;/strong&gt;  There are a ton of best practices, approaches, tutorials, and frameworks that assist developers to construct advanced multi-page apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Drawbacks of MPA
&lt;/h3&gt;

&lt;p&gt;Here are some drawbacks of the  Multi-Page Application approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slow Speed:&lt;/strong&gt; MPA is slower as the browser must reload the entire page from scratch whenever the user wants to access new data or moves to a different part of the website. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Development time:&lt;/strong&gt; In multi-page apps the frontend and backend are more tightly coupled, therefore developers need more time to build them. There’s typically one project that requires the frontend and backend code to be written from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Both approaches discussed above have some pros and cons. SPA is characterized by its speed and the ability to develop a mobile application based on ready-made code. But at the same time, SPA has poor SEO optimization. Thus, this architecture is an excellent approach for SaaS platforms, social networks, and closed communities, where search engine optimization does not matter. &lt;/p&gt;

&lt;p&gt;MPA offers high performance and better SEO optimization but still does not enable you to easily develop a mobile application.MPA’s are best used in e-commerce apps, business catalogs, and marketplaces. If you’re a large company that offers a wide variety of products, then an MPA is the best choice for you. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Being a custom web development company, Codebrisk has proven experience in developing single-page and multi-page applications for companies of any size and in a variety of industries. At Codebrisk, our expert developers utilize the best techniques for building custom-made web apps. So if you have a great idea, We are here for you to assist with this initiative. Please Feel free to &lt;a href="https://codebrisk.com/contact-us"&gt;get in touch&lt;/a&gt; with us.&lt;/p&gt;

&lt;p&gt;For More &lt;strong&gt;News &amp;amp; Updates&lt;/strong&gt;,&lt;br&gt;
Don't forget to follow me on &lt;a href="https://twitter.com/iamSumyyaKhan"&gt;Twitter/iamSumyyaKhan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>webdev</category>
      <category>programming</category>
      <category>vue</category>
    </item>
    <item>
      <title>Why You Need to Turn Your Regular App into PWA Using Vue.js</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Thu, 31 Mar 2022 07:42:53 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/why-you-need-to-turn-your-regular-app-into-pwa-using-vuejs-k3a</link>
      <guid>https://dev.to/sumyya_khan/why-you-need-to-turn-your-regular-app-into-pwa-using-vuejs-k3a</guid>
      <description>&lt;p&gt;Progressive Web Applications (PWA) are a solution that manages the increased usage of native apps, specifically by smartphone technologies. Native apps are software programs produced for use on a certain device or operating systems such as Android and iOS. &lt;br&gt;
The term “progressive” directs to the fact that they offer new features and, from the user experience’s point of view, they are initially recognized as regular websites but progressively they act more like mobile apps, among other things multiplatform. Progressive web applications (PWAs) incorporate the properties of native apps with traditional web technology.  This has become essential because native apps are limited to the platforms they are made for. They are also limited by the cost of development and maintenance. Hence, native apps are useful, but they don't meet the various needs of different businesses. &lt;/p&gt;

&lt;h3&gt;
  
  
  Turn your App into a PWA using Vue.js
&lt;/h3&gt;

&lt;p&gt;Any regular website can be a Progressive web application.  A static blog, one-pager, an eCommerce store, or a simple website could be a PWA. Aliexpress, Flipkart, Twitter, Soundslice, Pinterest, Spotify, and Starbucks are the big enterprises offering a PWA experience.&lt;/p&gt;

&lt;p&gt;If you want a website into a progressive web application, you can do this effortlessly. PWAs have a few requirements, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A service worker:&lt;/strong&gt; A service worker is a core PWA technology in the form of a JavaScript file that your browser runs in the background. It is independent of a web page and is directly accountable for managing network requests and the core PWA features, such as push notifications or background synchronization. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A web app manifest:&lt;/strong&gt; This is a JSON file that corresponds with the browser about the web app and how it should act when installed on the user’s device. The manifest web app file also contains the app description, icons, name, display, and colors. It is responsible for driving the user to “Add to Home Screen.”    &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTTPS:&lt;/strong&gt; For the service worker to deliver offline functionality and fast execution, the app should be operating in a secure environment. The HTTPS protocol guarantees the protection of the web app by stopping third parties from overriding your website using a malicious service worker.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most hosts provide SSL certificates for free these days (many even do so automatically). So that is the easiest part.&lt;br&gt;
Fo other requirements, there’s an amazing boilerplate that goes into constructing all of that stuff, both in terms of the files and the code itself. If you do it manually, it would be a tiresome task.&lt;br&gt;
Luckily, there’s a more comfortable way with Vue, thanks to Vue CLI! Vue CLI offers a convenient PWA plugin, and, even better, it can be added to an existing or new project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of using Vue Js for PWAs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Super Performance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When it comes to performance and speed, PWA and Vue JS work hand-in-hand. While PWAs are relentlessly fast. They quickly respond to user interactions and you can smoothly scroll through pages without being interrupted. On the other hand, Vue.JS is a light framework offering exceptional performance with the help of its progressive nature. When using Vue JS development along with PWAs, you can leverage offline access features provided by PWAs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improved Security&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Security is a powerful feature that every enterprise considers when developing web or mobile apps to upgrade their product or services. Developing a PWA utilizing vue.js or transforming your vue.js into a PWA enforces transport layer security to encrypt all the sensitive information and data. Moreover, PWA bounds device hardware access without users’ consent, which enables the Vue JS development agency to utilize trusted JavaScript libraries for the Vue JS development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feels like a Native App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vue Js is generally recognized to develop single-page applications and user interfaces. However, using Vue.JS for progressive web application development empowers you to construct native-like apps. It is possible to employ JSON files to alter various application elements, including app icons, theme, color, etc. Utilizing these properties, you gain full control over the procedure of developing web or mobile apps to compete with native apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Small Size&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;One shared feature between PWAs and Vue JS is that both are smaller in size. It is hardly in KBs. It assists businesses to leverage faster installation than any other frameworks or libraries. Such tiny size and quicker installation have captured many companies worldwide and left many widespread frameworks behind.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lower Development Cost&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Another amazing advantage of employing PWA and Vue JS is that you can reduce a lot of development costs. With PWA development, you can utilize the same stack for both mobile and web. Also, it is helpful to reuse the same piece of code as much as possible. So, in the end, it allows businesses to lower the overall development cost for the web or mobile app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improved SEO&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We all know that Vue JS is not so SEO-friendly. With page load speeds, troubles in updating Meta, sitemap, and canonicals have made Vue JS tiresome to optimize for SEO. However, transforming Vue JS applications into PWAs can aid businesses to optimize their web applications for SEO. Since PWAs are linkable, it is possible to optimize them for search engines quickly. This greatly eliminates the restrictions posed by Vue JS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Web development team at Codebrisk contemplates PWA to be the future of web applications for the B2C and B2B sectors. Here are some of the services we offer as a PWA app development company like PWA UI design, PWA web development, PWA integration, etc. If you need to develop a PWA for your enterprise, the Codebrisk team has impressive experience in PWA development and will be glad to assist you with your projects. Please feel free to &lt;a href="https://codebrisk.com/contact-us"&gt;contact us&lt;/a&gt; or get a free &lt;a href="https://codebrisk.com/launch-your-project"&gt;estimate of your project here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For More News &amp;amp; Updates, Don't forget to follow me on &lt;a href="https://twitter.com/iamSumyyaKhan"&gt;Twitter/iamSumyyaKhan&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>pwa</category>
      <category>laravel</category>
      <category>vue</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why Choose a Laravel Ecommerce PWA for Your Business</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Mon, 28 Mar 2022 06:30:15 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/why-choose-a-laravel-ecommerce-pwa-for-your-business-3pao</link>
      <guid>https://dev.to/sumyya_khan/why-choose-a-laravel-ecommerce-pwa-for-your-business-3pao</guid>
      <description>&lt;p&gt;Nowadays, most people use mobile apps to visit websites. By using PWA, you can generate more traffic on the website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PWA&lt;/strong&gt; stands for a Progressive Web Application. This is an application constructed from the web technologies we all know and adore, like HTML, CSS, and JavaScript, but with a feel and functionality that is competent as a real native app. Thanks to a couple of smart additions, you can turn almost any website into a progressive web app. This means that you can build a PWA rather quickly, in regards to a native app that’s pretty difficult to develop. Moreover, you can propose all the characteristics of native apps, like push notifications, offline support, and much more.&lt;/p&gt;

&lt;p&gt;Many websites you encounter online are Progressive Web Apps. Suppose we take the example of twitter.com, If you visit that site on your smartphone, you can install it on your home screen. Now, on opening the saved Twitter site, you’ll witness that it looks and functions just like a native app. There’s no browser window or any difference in running it from an iPhone or an Android smartphone. You just have to simply log in and you’re good to go. That’s the primary advantage of constructing your web app with a PWA in mind.&lt;br&gt;
&lt;strong&gt;PWAs&lt;/strong&gt; are gaining popularity. Many prominent websites are PWAs, like Starbucks.com,Flipboard.com, AliExpress.com,  Pinterest.com, Washingtonpost.com, and Uber.com are even installable on your home screen and present a comparative experience to their native applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Laravel Ecommerce PWA
&lt;/h3&gt;

&lt;p&gt;Laravel Ecommerce Progressive Web Application uses web compatibilities and provides an application experience to the user. By using a Laravel Ecommerce progressive web app, you can do things like work on a low internet connection, load on the home screen, Social Sharing of products, etc.&lt;br&gt;
The Progressive Web Application is lightning fast as compared to the simple website. Due to the immediate execution as result user engagement increases on the website. As we know that Flipkart is the largest eCommerce platform. Firstly they utilized the only app after that they introduced Flipkart PWA as Flipkart Lite. With the help of PWA, it converts 70% of users to customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features of Laravel Ecommerce PWA
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;More user-friendly than a web application.&lt;/li&gt;
&lt;li&gt;Dynamic SEO.&lt;/li&gt;
&lt;li&gt;Push Notification functionality.&lt;/li&gt;
&lt;li&gt;Admin can add PWA home page layout.&lt;/li&gt;
&lt;li&gt;Also, work with low-quality internet&lt;/li&gt;
&lt;li&gt;Do not need to update Progressive web Application.&lt;/li&gt;
&lt;li&gt;Admin can set the splash background color of the Progressive Web Application.&lt;/li&gt;
&lt;li&gt;The admin can enter the application name.&lt;/li&gt;
&lt;li&gt;Looks and feels like a native application.&lt;/li&gt;
&lt;li&gt;Increases user engagement in the store.&lt;/li&gt;
&lt;li&gt;Admin can upload and change the application icon.&lt;/li&gt;
&lt;li&gt;Admin can set the theme color of the Progressive Web Application.&lt;/li&gt;
&lt;li&gt;Support multiple currencies.&lt;/li&gt;
&lt;li&gt;Support social sharing feature of the product.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefits of PWA
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Less Storage Usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you compared it to any traditional application, the cost of utilizing Laravel eCommerce PWA is very low for the customer. Laravel eCommerce PWA doesn't require any substantial storage and performs better on their smartphones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User-Friendly&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Users can easily access the Laravel eCommerce PWA through a browser like Chrome, Safari, and Opera. PWA is mobile device independent so it can work on any mobile device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Offline Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PWA would also behave even if you are disconnected from the internet connection. This feature is primarily valuable for businesses that have a catalog, where the user does not require to reload it again and again to view it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt Loading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the user adds any progressive web app on the home screen, with the help of the service worker it loads immediately. FOR 3G connection, It takes 2.5 sec to load for the first visit and 7.1 sec to fully load the page. It takes 0.8 sec for the second visit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTPS Secure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PWA offers HTTPS secure solutions which enable the browser to manage some level of server encryption. This improves the benefit of PWA as it performs only through HTTPS to prevent the common man-in-middle attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy Social Sharing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While using a PWA, you can effortlessly share the products on your favorite social media spots like Facebook, Twitter, Whatsapp, etc with your friends and relatives to obtain their views. The feature is also furnished to work in offline mode.&lt;/p&gt;

&lt;h3&gt;
  
  
  Closing Notes
&lt;/h3&gt;

&lt;p&gt;The Web development team at &lt;strong&gt;Codebrisk&lt;/strong&gt; contemplates PWA to be the future of web applications for the B2C and B2B sectors. Here are some of the services we offer as a PWA app development company like PWA UI design, PWA web development, PWA integration, etc.&lt;br&gt;
If you need to develop a PWA for your enterprise, the Codebrisk team has impressive experience in PWA development and will be glad to assist you with your projects. Please feel free to &lt;a href="https://codebrisk.com/contact-us"&gt;contact us&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For More News &amp;amp; Updates, Follow me on &lt;a href="https://twitter.com/iamSumyyaKhan"&gt;Twitter/iamSumyyaKhan&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>pwa</category>
      <category>laravel</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>The Best Single Page Application Framework of 2022</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Thu, 17 Mar 2022 10:47:56 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/the-best-single-page-application-framework-of-2022-109l</link>
      <guid>https://dev.to/sumyya_khan/the-best-single-page-application-framework-of-2022-109l</guid>
      <description>&lt;p&gt;A &lt;strong&gt;SPA&lt;/strong&gt; (Single-page application) is a type of web application that loads only a single web document, and then updates the body content of that single document through JavaScript APIs such as XMLHttpRequest and Fetch when other content is to be shown.&lt;br&gt;
SPA permits users to utilize websites without loading whole new pages from the server, which can result in performance improvements and a more dynamic and smooth experience, with some tradeoff disadvantages such as SEO, more effort required to maintain state, implement navigation, and do meaningful performance monitoring.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which Single Page Application Framework is the Best?
&lt;/h3&gt;

&lt;p&gt;A Single Page Application framework is incorporated with a lot of utilities that drive the development process streamlined. Along with automating repetitious coding tasks, and offering ready-to-use components, these frameworks also provide HTML and AJAX support, URL routing, data caching, protection against security vulnerabilities, and improved performance.&lt;/p&gt;

&lt;p&gt;Some famous web frameworks used for the web application development of Single Page Applications are listed below.&lt;/p&gt;

&lt;h3&gt;
  
  
  React Js
&lt;/h3&gt;

&lt;p&gt;ReactJS is a widely used, high-performance library for creating the user interface. It is used in many popular social media sites such as Facebook, Instagram, etc. Earlier, the traditional approach was to create applications using server-rendered HTML. Each user interaction would result in generating a new request, therefore, loading an entirely new page. This resulted in slow loading and hence poor performance and poor customer experience. React uses virtual DOM and this &lt;strong&gt;“Virtual DOM”&lt;/strong&gt; is considered as the biggest benefit of React by the developers. React is preferred as the best framework for SPA development because it is &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight&lt;/li&gt;
&lt;li&gt;Separation of concerns(SoC)&lt;/li&gt;
&lt;li&gt;JSX – XML like syntax allows you to render HTML code using JavaScript&lt;/li&gt;
&lt;li&gt;Virtual DOMs&lt;/li&gt;
&lt;li&gt;Object-oriented paradigm&lt;/li&gt;
&lt;li&gt;Highly scalable and flexible&lt;/li&gt;
&lt;li&gt;High performance&lt;/li&gt;
&lt;li&gt;Components based framework that promotes reusability and flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Vue Js
&lt;/h3&gt;

&lt;p&gt;Vue Js is a front-end JavaScript framework built to develop web applications, SPA, and user interfaces, which is based on a model-view-view-model (MVVM) is known as Vue.js. The framework is focused on the view layer, component composition, and declarative rendering.&lt;br&gt;
If you prefer simplicity and flexibility in your front-end frameworks, then Vue is a good option. Besides, it’s the most lightweight of all other frameworks.&lt;/p&gt;

&lt;p&gt;Being a flexible open-source framework, it can be utilized for fast, cost-efficient web application development. You can produce complex traditional web applications with heavy traffic or small-scale static websites. Surprisingly, Vue is also competent in the development of single-page applications. Currently, such companies as GitLab, Baidu, and Alibaba use Vue.js for their needs. This is due to the many features it offers such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight, easy to use&lt;/li&gt;
&lt;li&gt;A minimalistic ecosystem&lt;/li&gt;
&lt;li&gt;Virtual DOM results in faster dynamic HTML pages rendering&lt;/li&gt;
&lt;li&gt;Customizable and reusable components&lt;/li&gt;
&lt;li&gt;MVVM software design architecture&lt;/li&gt;
&lt;li&gt;Reactive two-way data binding&lt;/li&gt;
&lt;li&gt;Easily integrable with other Vue frameworks&lt;/li&gt;
&lt;li&gt;User-friendly coding environment&lt;/li&gt;
&lt;li&gt;Flexible to integrate with any third-party apps&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AngularJS
&lt;/h3&gt;

&lt;p&gt;Angular is one of the open-source, front-end, JavaScript-based frameworks widely used in creating single page applications on the client-side. It has been created by Google and the popular users of AngularJS include Microsoft, Google, and PayPal. It is qualified of transferring the entire content directly from the server to the browser, loading all the pages at the same time. Once they are loaded, the page does not reload if a link is clicked upon; instead, the sections within the page are updated instantly. AngularJS allows faster loading of pages as there is less load on the server. The two-way data binding feature saves the burden of writing numerous codes. Here, automatic integration of data between model and view components takes place. Further, AngularJS works on MVC architecture. Below are some features of this single page application framework: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency injection&lt;/li&gt;
&lt;li&gt;High performance and speed&lt;/li&gt;
&lt;li&gt;Highly extensible with other libraries&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;Two-way data binding feature eliminating the need for DOM manipulation&lt;/li&gt;
&lt;li&gt;No dependencies to code&lt;/li&gt;
&lt;li&gt;Debugging and testing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  EmberJS
&lt;/h3&gt;

&lt;p&gt;EmberJS is a highly opinionated, open-source framework that facilitates greater flexibility. It observes a widget-based approach known by the name Ember components. The templates incorporated with Handlebars get updated automatically as the data changes, using minimal coding. The widespread users of EmberJS include Microsoft, Netflix, LinkedIn, Live, Vine, etc. Apple Music, which is a desktop application also uses EmberJS. Also, it has a powerful routing system. It works on the MVVM pattern and follows the Convention over Configuration (CoC) model. The data library presented by EmberJS is quite resourceful. Its friendly API makes many prefer EmberJS over other frameworks. It follows a two-way data binding pattern. &lt;/p&gt;

&lt;p&gt;The framework offers defaults and basic templates to promote the best developing techniques. Some other unique functionalities offered by Ember are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It has all the utilities a developer requires to develop a high-functioning application. It delivers hundreds of high-quality, curated npm packages.&lt;/li&gt;
&lt;li&gt;It is a scalable, easy-to-use UI architecture&lt;/li&gt;
&lt;li&gt;Ember Addons to execute new functionalities in your application.&lt;/li&gt;
&lt;li&gt;Ember CLI comes built-in with an environment with rapid rebuilds, and auto-reload&lt;/li&gt;
&lt;li&gt;Easy testing and deployment of web applications&lt;/li&gt;
&lt;li&gt;URL routing&lt;/li&gt;
&lt;li&gt;The inbuilt data layer can be integrated with popular database environments too&lt;/li&gt;
&lt;li&gt;Convention over configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Closing Notes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Single Page Applications are the reason for the rapid loading time and creative user interactions of many popular websites. Building SPA is an effective solution for drawing end-users and customers.&lt;/p&gt;

&lt;p&gt;At &lt;strong&gt;Codebirsk&lt;/strong&gt;, we facilitate the development of single-page apps as our main goal is to provide a smooth user experience.  Our proficient team of web developers has years of experience in providing successful web applications across the globe. So You can &lt;a href="https://codebrisk.com/contact-us"&gt;contact us&lt;/a&gt; for any suggestion about the development of an interactive, dynamic single-page application for your enterprise.&lt;/p&gt;

&lt;p&gt;For More News &amp;amp; Updates, Follow me on &lt;a href="https://twitter.com/iamSumyyaKhan"&gt;Twitter/iamSumyyaKhan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vue</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>10 Latest Tips about Laravel that you should know in 2022</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Wed, 09 Mar 2022 05:44:19 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/10-latest-tips-about-laravel-that-you-should-know-in-2022-1mho</link>
      <guid>https://dev.to/sumyya_khan/10-latest-tips-about-laravel-that-you-should-know-in-2022-1mho</guid>
      <description>&lt;p&gt;Laravel has been the Best framework of PHP for many years. It has a massive ecosystem, active community, strong job market, successful startups, MVC architecture support, the creative template engine, etc. It has everything that makes it beneficial to adopt new technology. Laravel also helps website developers simplify their development process with clean and reusable code. In this blog, I've collected some awesome tips and tricks related to Laravel that can assist you in upgrading your code and app performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  The findOrFail method also accepts a list of ids
&lt;/h3&gt;

&lt;p&gt;The findOrFail method also accepts a list of ids. If any of these ids are not found, then it fails. Nice if you need to retrieve a specific set of models and don't want to have to check that the count you got was the count you expected&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User::create(['id' =&amp;gt; 1]);
User::create(['id' =&amp;gt; 2);
User::create(['id' =&amp;gt; 3]);

// Retrives the user...
$user = User::findOrFail(1);

// Throws a 404 because the user doesn't exist...
User::findOrFail(99);

// Retrives all 3 users...
$users = User::findOrFail([1, 2, 3]);

// Throws because it is unable to find *all* of the users
User::findOrFail([1, 2, 3, 99]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Get a single column's value from the first result
&lt;/h3&gt;

&lt;p&gt;You can use the value() method to get a single column's value from the first result of a query.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Instead of
Integration::where('name', 'foo')-&amp;gt;first()-&amp;gt;active;

// You can use
Integration::where('name', 'foo')-&amp;gt;value('active');

// or this to throw an exception if no records found
Integration::where('name', 'foo')-&amp;gt;valueOrFail('active')';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Check if the altered value changed key
&lt;/h3&gt;

&lt;p&gt;Ever wanted to know if the changes you've made to a model have altered the value for a &lt;code&gt;key&lt;/code&gt; ? No problem, simply reach for &lt;code&gt;originalIsEquivalent&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$user = User::first(); // ['name' =&amp;gt; "John']

$user-&amp;gt;name = 'John';

$user-&amp;gt;originalIsEquivalent('name'); // true

$user-&amp;gt;name = 'David'; // Set directly
$user-&amp;gt;fill(['name' =&amp;gt; 'David']); // Or set via fill

$user-&amp;gt;originalIsEquivalent('name'); // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Remove several global scopes from the query
&lt;/h3&gt;

&lt;p&gt;When using Eloquent Global Scopes, you not only can use MULTIPLE scopes but also remove certain scopes when you don't need them, by providing the array without &lt;code&gt;withoutGlobalScopes()&lt;/code&gt; Link to docs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Remove all of the global scopes...
User::withoutGlobalScopes()-&amp;gt;get();

// Remove some of the global scopes...
User::withoutGlobalScopes([
    FirstScope::class, SecondScope::class
])-&amp;gt;get();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Order based on a related model's average or the count
&lt;/h3&gt;

&lt;p&gt;Did you ever need to order based on a related model's average or count? It's easy with Eloquent!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function bestBooks()
{
    Book::query()
        -&amp;gt;withAvg('ratings as average_rating', 'rating')
        -&amp;gt;orderByDesc('average_rating');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Retrieve the Query Builder after filtering the results
&lt;/h3&gt;

&lt;p&gt;To retrieve the Query Builder after filtering the results: you can &lt;code&gt;use -&amp;gt;toQuery()&lt;/code&gt;. The method internally uses the first model of the collection and a &lt;code&gt;whereKey&lt;/code&gt; comparison on the Collection models.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Retrieve all logged_in users
$loggedInUsers = User::where('logged_in', true)-&amp;gt;get();

// Filter them using a Collection method or php filtering
$nthUsers = $loggedInUsers-&amp;gt;nth(3);

// You can't do this on the collection
$nthUsers-&amp;gt;update(/* ... */);

// But you can retrieve the Builder using -&amp;gt;toQuery()
if ($nthUsers-&amp;gt;isNotEmpty()) {
    $nthUsers-&amp;gt;toQuery()-&amp;gt;update(/* ... */);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Checking For Table/Column Existence
&lt;/h3&gt;

&lt;p&gt;You may check for the existence of a table or column using the hasTable and hasColumn methods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (Schema::hasTable('users')) {
    // The "users" table exists...
}

if (Schema::hasColumn('users', 'email')) {
    // The "users" table exists and has an "email" column...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use through instead of the map when using pagination
&lt;/h3&gt;

&lt;p&gt;When you want to map paginated data and return only a subset of the fields, use through rather than map. The map breaks the pagination object and changes its identity. While through works on the paginated data itself&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Don't: Mapping paginated data
$employees = Employee::paginate(10)-&amp;gt;map(fn ($employee) =&amp;gt; [
    'id' =&amp;gt; $employee-&amp;gt;id,
    'name' =&amp;gt; $employee-&amp;gt;name
])

// Do: Mapping paginated data
$employees = Employee::paginate(10)-&amp;gt;through(fn ($employee) =&amp;gt; [
    'id' =&amp;gt; $employee-&amp;gt;id,
    'name' =&amp;gt; $employee-&amp;gt;name
])
$request-&amp;gt;date() method
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Get value from the session and forget
&lt;/h3&gt;

&lt;p&gt;If you need to grab something from the Laravel session, then forget it immediately, consider using &lt;code&gt;session()-&amp;gt;pull($value)&lt;/code&gt;. It completes both steps for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Before
$path = session()-&amp;gt;get('before-github-redirect', '/components');

session()-&amp;gt;forget('before-github-redirect');

return redirect($path);

// After
return redirect(session()-&amp;gt;pull('before-github-redirect', '/components'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  New Laravel v8.77: $request-&amp;gt;date() method.
&lt;/h3&gt;

&lt;p&gt;Now you don't need to call Carbon manually, you can do something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$post-&amp;gt;publish_at = $request-&amp;gt;date('publish_at')-&amp;gt;addHour()-&amp;gt;startOfHour();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are some useful tips and tricks related to the Laravel framework, I hope that by following these tips you will improve the performance of your code and usability.&lt;/p&gt;

&lt;p&gt;For more details visit this &lt;a href="https://codebrisk.com/blog/10-latest-tips-about-laravel-that-you-should-know-in-2022"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For More News &amp;amp; Updates, Follow me on &lt;a href="https://twitter.com/iamSumyyaKhan"&gt;Twitter/iamSumyyaKhan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>What's New in Laravel 9 - Features &amp; Updates</title>
      <dc:creator>sumyya khan</dc:creator>
      <pubDate>Tue, 01 Mar 2022 05:24:33 +0000</pubDate>
      <link>https://dev.to/sumyya_khan/whats-new-in-laravel-9-features-updates-5648</link>
      <guid>https://dev.to/sumyya_khan/whats-new-in-laravel-9-features-updates-5648</guid>
      <description>&lt;p&gt;&lt;strong&gt;Laravel v9&lt;/strong&gt; is scheduled to be released around September of 2021, but the Laravel Crew decided to push this release back to January of 2022. Now Laravel has been released on 8 February 2022. The new version of the Laravel framework has been shipped with a variety of robust features and updates. Laravel 9 continues the improvements made in Laravel 8 by introducing support for Symfony 6.0 components, Symfony Mailer, Flysystem 3.0, improved &lt;code&gt;route:list&lt;/code&gt; output, a Laravel Scout database driver, new Eloquent &lt;code&gt;accessor/mutator&lt;/code&gt; syntax, implicit route bindings via Enums, and a variety of other bug fixes and usability improvements. Laravel 9.x requires a minimum PHP version of 8.0 and Flysystem 3.x.&lt;/p&gt;

&lt;p&gt;Laravel 9 is the subsequent long-term support version (LTS) and will accept bug fixes until February 2024 and security fixes until February 2025. Here are some of the significant features that I want to share with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Flysystem 3.x
&lt;/h2&gt;

&lt;p&gt;Laravel 9.x upgrades our upstream Flysystem dependency to Flysystem 3.x. Flysystem powers all of the filesystem interactions offered by the Storage facade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improved Eloquent Accessors/Mutators
&lt;/h2&gt;

&lt;p&gt;Improved Eloquent &lt;code&gt;accessors/mutators&lt;/code&gt; was contributed by Taylor Otwell. Laravel 9.x provides a new way to define Eloquent accessors and mutators. In Laravel 9.x you can specify an accessor and mutator utilizing a single, non-prefixed method by type-hinting a return type of &lt;code&gt;Illuminate\Database\Eloquent\Casts\Attribute&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use Illuminate\Database\Eloquent\Casts\Attribute;

public function name(): Attribute
{
    return new Attribute(
        get: fn ($value) =&amp;gt; strtoupper($value),
        set: fn ($value) =&amp;gt; $value,
    );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Enum Eloquent Attribute Casting
&lt;/h2&gt;

&lt;p&gt;Eloquent now allows you to cast your attribute values to PHP enums. To accomplish this, you may specify the attribute and enum you wish to cast in your model's $casts property array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use App\Enums\ServerStatus;

/**
 * The attributes that should be cast.
 *
 * @var array
 */
protected $casts = [
    'status' =&amp;gt; ServerStatus::class,
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you have defined the cast on your model, the specified attribute will be automatically cast to and from an &lt;code&gt;enum&lt;/code&gt; when you interact with the attribute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if ($server-&amp;gt;status == ServerStatus::provisioned) {
    $server-&amp;gt;status = ServerStatus::ready;

    $server-&amp;gt;save();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Slot Name Shortcut
&lt;/h2&gt;

&lt;p&gt;In previous releases of Laravel, slot names were provided using a name attribute on the x-slot tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;x-alert&amp;gt;
    &amp;lt;x-slot name="title"&amp;gt;
        Server Error
    &amp;lt;/x-slot&amp;gt;

    &amp;lt;strong&amp;gt;Whoops!&amp;lt;/strong&amp;gt; Something went wrong!
&amp;lt;/x-alert&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, beginning in Laravel 9.x, you may specify the slot's name using a convenient, shorter syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;x-slot:title&amp;gt;
    Server Error
&amp;lt;/x-slot&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Controller Route Groups
&lt;/h2&gt;

&lt;p&gt;Now you can utilize the controller method to define the common controller for all of the routes within the group. Then, when defining the routes, you only need to provide the controller method that they invoke:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use App\Http\Controllers\OrderController;

Route::controller(OrderController::class)-&amp;gt;group(function () {
    Route::get('/orders/{id}', 'show');
    Route::post('/orders', 'store');
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Laravel Scout Database Engine
&lt;/h2&gt;

&lt;p&gt;If your application interacts with small to medium-sized databases or has a light workload, Now you can use Scout's "database" engine instead of a dedicated search service such as Algolia or MeiliSerach. The database engine will use where like clauses and full-text indexes when filtering results from your existing database to determine the applicable search results for your query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improved Ignition Exception Page
&lt;/h2&gt;

&lt;p&gt;Spatie Ignition open-source exception debug page has been redesigned from the ground up. The new, improved Ignition ships with Laravel 9.x and it includes light/dark themes, customizable "open in editor" functionality, and many more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implicit Route Bindings With Enums
&lt;/h2&gt;

&lt;p&gt;PHP 8.1 introduces support for Enums. Laravel 9.x presents the ability to type-hint an Enum on your route definition and Laravel will only invoke the route if that route segment is a valid Enum value in the URI. Otherwise, an HTTP &lt;code&gt;404&lt;/code&gt; response will be returned automatically. For example, given the following Enum:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum Category: string
{
    case Fruits = 'fruits';
    case People = 'people';
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, You can define a route that will only be invoked if the &lt;code&gt;{category}&lt;/code&gt; route segment is fruits or people. Otherwise, an HTTP &lt;code&gt;404&lt;/code&gt; response will be returned:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Route::get('/categories/{category}', function (Category $category) {
    return $category-&amp;gt;value;
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above are some main features and updates of Laravel 9.x, If you want to explore more about Laravel 9, you can visit this &lt;a href="https://laravel.com/docs/9.x/releases"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For More News &amp;amp; Updates, Follow me on &lt;a href="https://twitter.com/iamSumyyaKhan"&gt;Twitter/iamSumyyaKhan&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>laravel9</category>
      <category>php</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
