<?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: 8bityard</title>
    <description>The latest articles on DEV Community by 8bityard (@8bityard).</description>
    <link>https://dev.to/8bityard</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%2F713671%2Fd2b530b1-f65c-4fc1-82f4-a9c908fe1448.png</url>
      <title>DEV Community: 8bityard</title>
      <link>https://dev.to/8bityard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/8bityard"/>
    <language>en</language>
    <item>
      <title>How to pass multiple parameters in URL laravel ?</title>
      <dc:creator>8bityard</dc:creator>
      <pubDate>Tue, 18 Jan 2022 13:03:02 +0000</pubDate>
      <link>https://dev.to/8bityard/how-to-pass-multiple-parameters-in-url-laravel--2483</link>
      <guid>https://dev.to/8bityard/how-to-pass-multiple-parameters-in-url-laravel--2483</guid>
      <description>&lt;p&gt;Today we are going to know How to pass multiple parameters in URL laravel. I would like to show you how to create functionality to pass multiple parameters in the laravel application.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, what we’re doing here, This is the example :
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--otm5n6Q5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6yft77net20e57gltdh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--otm5n6Q5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6yft77net20e57gltdh.PNG" alt="pass multiple parameters in URL in laravel" width="877" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please See below code - &lt;a href="https://8bityard.com/pass-multiple-parameters-in-url-laravel"&gt;https://8bityard.com/pass-multiple-parameters-in-url-laravel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow for More Related Laravel Tutorials : &lt;a href="https://8bityard.com/"&gt;https://8bityard.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>How to update Status using Bootstrap Toggle Button In Laravel 8</title>
      <dc:creator>8bityard</dc:creator>
      <pubDate>Fri, 14 Jan 2022 17:37:08 +0000</pubDate>
      <link>https://dev.to/8bityard/how-to-update-status-using-bootstrap-toggle-button-in-laravel-8-dgo</link>
      <guid>https://dev.to/8bityard/how-to-update-status-using-bootstrap-toggle-button-in-laravel-8-dgo</guid>
      <description>&lt;p&gt;Today we are going to know how to create user active and inactive status using the bootstrap toggle button. I would like to show you how to create functionality to active and inactive status in the laravel 8 application. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, what we’re doing here, This is the example :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funjx7cz3zsh1lb0gleuo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funjx7cz3zsh1lb0gleuo.PNG" alt="change status using ajax with bootstrap toggle button in laravel 8. here we will update user status active inactive with Boolean data type with ( 0 and 1)."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is pretty simple and very easy. we can implement change status using ajax with bootstrap toggle button in laravel 8. here we will update user status active inactive with Boolean data type with ( 0 and 1). We will do this toggle stuff using jQuery ajax.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please See below code -&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://8bityard.com/update-status-using-toggle-button-in-laravel-8/" rel="noopener noreferrer"&gt;https://8bityard.com/update-status-using-toggle-button-in-laravel-8/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>html</category>
      <category>javascript</category>
      <category>php</category>
    </item>
    <item>
      <title>Laravel 8: Create a Custom Helper Function</title>
      <dc:creator>8bityard</dc:creator>
      <pubDate>Sun, 26 Sep 2021 16:38:05 +0000</pubDate>
      <link>https://dev.to/8bityard/laravel-8-create-a-custom-helper-function-5ep9</link>
      <guid>https://dev.to/8bityard/laravel-8-create-a-custom-helper-function-5ep9</guid>
      <description>&lt;p&gt;In this article, I will give you an example of the “Custom helper function in laravel“, So you can easily apply it with your laravel 5, laravel 6, laravel 7, and laravel 8 application.&lt;/p&gt;

&lt;p&gt;What we will cover:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Register Helper in composer.json&lt;/li&gt;
&lt;li&gt;Get data in controller using helper&lt;/li&gt;
&lt;li&gt;Get data in Blade File using helper.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;we call all the category table data in the controller and blade file using a custom helper.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2z2igtvi5x87cliwh3if.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2z2igtvi5x87cliwh3if.png" alt="laravel custom helper function"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a folder and a file :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this step, you need to create &lt;strong&gt;app/Helpers/helpers.php&lt;/strong&gt; in your laravel project and put the following code in that file:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0p7l8ebzbf5kzr57tr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0p7l8ebzbf5kzr57tr7.png" alt="helper register in laravel"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; "autoload": {
         "files": [
            "app/Helper/Helpers.php"
        ],

        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Regenerate the list of all classes in the app, Hit this command in the terminal.&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;composer dump-autoload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we create a function in &lt;strong&gt;Helper\Helpers.php&lt;/strong&gt; file to get the &lt;strong&gt;category data from the database using Category Model.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app\Helper\Helpers.php&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; &amp;lt;?php
  namespace App\Helper;
  use App\Model\Category;

  class Helpers
  {
    #Get Category Data From Category Model
    static function get_catdata()
    {
        $catdata = Category::get();
        return $catdata;
    }
  }

  ?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we can call our function anywhere in the view and controller like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get data in blade file using helper :&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;&amp;lt;table class="table"&amp;gt;
            @php
            $catData = \App\Helper\Helpers::get_catdata()
            @endphp
            &amp;lt;thead&amp;gt;
               &amp;lt;tr&amp;gt;
                  &amp;lt;th&amp;gt;S.no&amp;lt;/th&amp;gt;
                  &amp;lt;th&amp;gt;Category Name&amp;lt;/th&amp;gt;
               &amp;lt;/tr&amp;gt;
            &amp;lt;/thead&amp;gt;
            &amp;lt;tbody&amp;gt;
               @foreach($catData as $key =&amp;gt; $data)
               &amp;lt;tr&amp;gt;
                  &amp;lt;td&amp;gt;{{ $key+1 }}&amp;lt;/td&amp;gt;
                  &amp;lt;td&amp;gt;{{ $data-&amp;gt;name }}&amp;lt;/td&amp;gt;
               &amp;lt;/tr&amp;gt;
            &amp;lt;/tbody&amp;gt;
            @endforeach
         &amp;lt;/table&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feiy7pmvqou4q06d0d5cp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feiy7pmvqou4q06d0d5cp.png" alt="helper data in blade file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get data in controller using helper :&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;&amp;lt;?php

  namespace App\Http\Controllers;

  use Illuminate\Http\Request;
  use App\Helper\Helpers;

  class TestController extends Controller
  {

   public function categoryList()
   {

    $data = Helpers::get_catdata();
    dd($data);
   }
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlcrdiitt9tr3puxbvfn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlcrdiitt9tr3puxbvfn.png" alt="get helper data in controller"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article is originally published in : &lt;a href="https://8bityard.com/how-to-create-custom-helper-in-laravel-8/" rel="noopener noreferrer"&gt;Custom helper function in laravel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read Also :&lt;/strong&gt; &lt;a href="https://8bityard.com/change-the-date-format-in-the-blade-file-in-laravel/" rel="noopener noreferrer"&gt;Change the date format in the blade file in Laravel&lt;/a&gt;.&lt;/p&gt;

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