<?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: Tahsin Ahmed</title>
    <description>The latest articles on DEV Community by Tahsin Ahmed (@tahsin52225).</description>
    <link>https://dev.to/tahsin52225</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%2F558189%2Fa242edce-7001-4a19-a9c7-32979901242b.jpg</url>
      <title>DEV Community: Tahsin Ahmed</title>
      <link>https://dev.to/tahsin52225</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tahsin52225"/>
    <language>en</language>
    <item>
      <title>Laravel log stream to Kibana Elasticsearch Monolog</title>
      <dc:creator>Tahsin Ahmed</dc:creator>
      <pubDate>Fri, 08 Dec 2023 10:52:00 +0000</pubDate>
      <link>https://dev.to/tahsin52225/laravel-log-stream-to-kibana-elasticsearch-monolog-278h</link>
      <guid>https://dev.to/tahsin52225/laravel-log-stream-to-kibana-elasticsearch-monolog-278h</guid>
      <description>&lt;p&gt;ELK ( Elasticsearch, Logdash, and Kibana) is one of the popular log management platforms for log analysis. But for this project I will be using Laravel Monolog for handling the logs instead of Logdash.&lt;br&gt;
Before getting into coding let’s know a little about the platforms.&lt;/p&gt;
&lt;h2&gt;
  
  
  Monolog :
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Monolog&lt;/code&gt; is a PHP logging library that’s included in Laravel. This library is widely customizable and used because of the easy handle management and it provides build in handler that can easily help anyone to send logs to multiple destinations. &lt;br&gt;
Here’s &lt;code&gt;Monolog&lt;/code&gt; &lt;a href="https://github.com/Seldaek/monolog"&gt;source code&lt;/a&gt; and &lt;a href="https://laravel.com/docs/10.x/logging#monolog-channel-customization"&gt;Laravel documentation&lt;/a&gt; for monolog.&lt;/p&gt;
&lt;h2&gt;
  
  
  Elasticsearch :
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html"&gt;&lt;code&gt;Elasticsearch&lt;/code&gt;&lt;/a&gt;is a free and &lt;a href="https://github.com/elastic/elasticsearch"&gt;open-source&lt;/a&gt; analytics and search engine that returns and stores data in the JSON index format. Users may easily store, search and analyze huge quantities of data thanks to this engine. Because it uses an index rather than directly querying the text data, it is able to respond to search results in milliseconds. Simply put, &lt;code&gt;Elasticsearch&lt;/code&gt;functions as a server that can handle JSON queries and return JSON information.&lt;/p&gt;
&lt;h2&gt;
  
  
  Kibana:
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Kibana&lt;/code&gt; is a visual interface tool that lets you work with log data that has been mass-stored in Elasticsearch clusters to explore, visualize, and generate reports. &lt;code&gt;Kibana's&lt;/code&gt; primary functionalities are data analysis and querying. Furthermore, you may see data in several ways with &lt;code&gt;Kibana's&lt;/code&gt; visualization tools by utilizing heat maps, line graphs, pie charts, histograms, and geospatial support. You can look for root cause diagnostics in the data stored in Elasticsearch using a variety of techniques.&lt;br&gt;
&lt;a href="https://www.elastic.co/guide/en/kibana/current/index.html"&gt;Kibana documentation &lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Ok!! Let's start coding
&lt;/h3&gt;
&lt;h2&gt;
  
  
  Step 01: Run Kibana and Elasticsearch with docker
&lt;/h2&gt;

&lt;p&gt;I am using docker to run &lt;code&gt;Laravel&lt;/code&gt; , &lt;code&gt;Kibana&lt;/code&gt;, &lt;code&gt;Elasticsearch&lt;/code&gt; . I hope you already know how to run &lt;code&gt;Laravel&lt;/code&gt;projects in docker. For &lt;code&gt;Kibana&lt;/code&gt; and &lt;code&gt;Elasticsearch&lt;/code&gt;, Here's my docker-compose code: -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; kibana: 
    image: kibana:8.11.1
    container_name : kibana_container
    ports:
      - "5601:5601"
    environment:
      ELASTICSEARCH_HOSTS: http://elasticsearch:9200
      ELASTICSEARCH_URL: http://elasticsearch:9200
    networks:
      - laravel
  elasticsearch: 
    image: elasticsearch:8.11.1
    container_name: elasticsearch_container
    ports:
      - "9200:9200"
    environment:
      - http.host=0.0.0.0
      - transport.host=127.0.0.1
      - discovery.type=single-node # To run single node 
      - xpack.security.enabled=false # To remove SSL complexity
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - "./elk-data:/usr/share/elasticsearch/data"

    networks:
      - laravel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PS : I am keeping all my container in &lt;code&gt;laravel&lt;/code&gt;network.&lt;br&gt;
Now &lt;code&gt;docker-compose up --build&lt;/code&gt; to see &lt;code&gt;Kibana&lt;/code&gt;and &lt;code&gt;Elasticsearch&lt;/code&gt; is up and running.&lt;br&gt;
Elasticsearch will run on : &lt;code&gt;http://localhost:9200/&lt;/code&gt;&lt;br&gt;
Kibana will run on : &lt;code&gt;http://localhost:5601/&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 02: Setup &lt;code&gt;env&lt;/code&gt; file
&lt;/h2&gt;

&lt;p&gt;In .env add this lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ELASTIC_HOST=elasticsearch_container:9200
ELASTIC_LOGS_INDEX=laravel_logs
LOG_CHANNEL=elastic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 03: Create config file
&lt;/h2&gt;

&lt;p&gt;Create a config file inside &lt;code&gt;config/elastic_log.php&lt;/code&gt; . Write this in that file&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

return [
    'host' =&amp;gt; env('ELASTIC_HOST'),
    'index' =&amp;gt; 'laravel_logs',
    'prefix' =&amp;gt; 'api',
    'type' =&amp;gt; '_doc',
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 04: Create ElasticLog Provider
&lt;/h2&gt;

&lt;p&gt;Create a Laravel provider with this command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:provider ElasticlogProvider 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and put this block of code inside &lt;code&gt;boot&lt;/code&gt; function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        $index = rtrim(config('elastic_log.prefix'), '_') . '_' . config('elastic_log.index');
        $type = config('elastic_log.type');

        $this-&amp;gt;app-&amp;gt;bind(Client::class, function ($app) {
            return ClientBuilder::create()-&amp;gt;setHosts([config('elastic_log.host')])-&amp;gt;setHttpClient(new HttpClient(['verify' =&amp;gt; false]))-&amp;gt;build();
        });

        $this-&amp;gt;app-&amp;gt;bind(ElasticsearchFormatter::class, function ($app) use ($index, $type) {
            return new ElasticsearchFormatter($index, $type);
        });

        $this-&amp;gt;app-&amp;gt;bind(ElasticsearchHandler::class, function ($app) use ($index, $type) {
            return new ElasticsearchHandler($app-&amp;gt;make(Client::class), [
                'index'        =&amp;gt; $index,
                'type'         =&amp;gt; $type,
                'ignore_error' =&amp;gt; false,
            ]);
        });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 04: Create Log channel
&lt;/h2&gt;

&lt;p&gt;In &lt;code&gt;config/logging.php&lt;/code&gt; add a new &lt;code&gt;monolog&lt;/code&gt; channel named &lt;code&gt;elastic&lt;/code&gt; under &lt;code&gt;channels&lt;/code&gt; array&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'elastic' =&amp;gt; [
            'driver' =&amp;gt; 'monolog',
            'handler' =&amp;gt; ElasticsearchHandler::class,
            'level' =&amp;gt; 'debug',
            'formatter' =&amp;gt; ElasticsearchFormatter::class,
 ],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 05: Create a custom command
&lt;/h2&gt;

&lt;p&gt;Create a Laravel custom command with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:command ElasticLogSetup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;handle&lt;/code&gt; function add this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$index = rtrim(config('elastic_log.prefix'), '_') . '_' . config('elastic_log.index');

if (!$this-&amp;gt;client-&amp;gt;indices()-&amp;gt;exists(['index' =&amp;gt; $index])) {
            $this-&amp;gt;client-&amp;gt;indices()-&amp;gt;create([
                'index' =&amp;gt; $index,
            ]);
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to change the signature of the command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   protected $signature = 'elastic:log_setup';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now run the command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan elastic:log_setup 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 06: Add view data for viewing in Kibana
&lt;/h2&gt;

&lt;p&gt;Check the Kibana container is running. If it's working go to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:5601/app/kibana#/management/kibana/index_patterns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And add the &lt;code&gt;api_laravel_logs&lt;/code&gt; index into view &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hYtBds-d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9tebfuhcn50aaatjox9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hYtBds-d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9tebfuhcn50aaatjox9.png" alt="Kibana Dashboard Image" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Done
&lt;/h2&gt;

&lt;p&gt;Kibana now set up with Laravel project, You can stream logs with default Laravel &lt;code&gt;Log&lt;/code&gt; facade.&lt;/p&gt;

&lt;p&gt;Thank you !!! &lt;/p&gt;

&lt;h3&gt;
  
  
  Resources :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.toElasticsearch:%20What%20It%20Is,%20How%20It%20Works,%20And%20What%20It%E2%80%99s%20Used%20For"&gt; Elasticsearch: What It Is, How It Works, And What It’s Used For&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.clariontech.com/platform-blog/what-is-kibana-used-for-10-important-features-to-know"&gt;What is Kibana Used for?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tasmidur.medium.com/laravel-log-management-using-elasticsearch-and-kibana-10f0af42fd60#:~:text=The%20monolog%20provides%20an%20Elasticsearch,dashboards%20based%20on%20your%20logs."&gt;Laravel Log Management Using Elasticsearch and Kibana&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>kibana</category>
      <category>elasticsearch</category>
      <category>learning</category>
    </item>
    <item>
      <title>How to open Atom editor from terminal in Windows</title>
      <dc:creator>Tahsin Ahmed</dc:creator>
      <pubDate>Thu, 13 Oct 2022 06:55:35 +0000</pubDate>
      <link>https://dev.to/tahsin52225/how-to-open-atom-editor-from-terminal-in-windows-17kl</link>
      <guid>https://dev.to/tahsin52225/how-to-open-atom-editor-from-terminal-in-windows-17kl</guid>
      <description>&lt;h2&gt;
  
  
  Step 01:
&lt;/h2&gt;

&lt;p&gt;Got to windows start and type run or type click &lt;code&gt;win + R&lt;/code&gt;&lt;br&gt;
This will open up run prompt. &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%2F97pqwtnwea70n4gvf72j.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%2F97pqwtnwea70n4gvf72j.png" alt="Run Prompt Image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 02:
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;SystemPropertiesAdvanced.exe&lt;/code&gt; and hit enter System properties window will show up. &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%2Faru0ztogl5r7srn8kk26.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%2Faru0ztogl5r7srn8kk26.png" alt="System Properties window iamge"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 03:
&lt;/h2&gt;

&lt;p&gt;Then go &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Environment Variables &amp;gt;&amp;gt; Path&lt;/code&gt;&lt;br&gt;
click edit then new and paste&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\&amp;lt;user&amp;gt;\AppData\Local\atom\app-x.xx.x\resources\cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and Done. &lt;br&gt;
Now you can use &lt;code&gt;atom .&lt;/code&gt; to open atom with bash or terminal.&lt;/p&gt;

&lt;p&gt;_P.S : To know your atom version go to _&lt;br&gt;
&lt;code&gt;C:\Users\&amp;lt;user&amp;gt;\AppData\Local\atom\&lt;/code&gt;&lt;br&gt;
You will find your app folder with version with it. &lt;/p&gt;

</description>
      <category>ide</category>
      <category>atom</category>
      <category>beginners</category>
      <category>tip</category>
    </item>
    <item>
      <title>DAY 01 - 100 Days With Vue</title>
      <dc:creator>Tahsin Ahmed</dc:creator>
      <pubDate>Wed, 24 Nov 2021 08:11:57 +0000</pubDate>
      <link>https://dev.to/tahsin52225/day-01-100-days-with-vue-22fb</link>
      <guid>https://dev.to/tahsin52225/day-01-100-days-with-vue-22fb</guid>
      <description>&lt;p&gt;At last, I have started to learn Vue.js. Well, starting is the hard part of learning. Today I have learned about how to integrate Vue CDN and add Vue property to your project.&lt;br&gt;
It's simple just add Vue CDN at the end of your Html file. Vue is ready for use.&lt;/p&gt;
&lt;h3&gt;
  
  
  Vue CDN
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/vue@next"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Adding Vue property in a particular HTML section
&lt;/h3&gt;

&lt;p&gt;In your app.js (External JS file) file you have to create a Vue app and mount it into a particular section. Well you can use a variable to declare the Vue app&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To add this Vue app into your HTML code you need to use the mount function to this object. Mount accepts a string value of a CSS selector in which this Vue code applies. Here we have a section that has an id named #user-goal&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#user-goal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Nice ! Vue is mounted on that section &lt;/p&gt;
&lt;h3&gt;
  
  
  "data" property of Vue object
&lt;/h3&gt;

&lt;p&gt;"data" is a predefined property of the Vue object which holds all the variables of the Vue app. "data" property always returns an object which holds a collection of variable names and values in a key-value pair. the variable value can be anything String, Number &lt;br&gt;
, Boolean etc.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;variable_name&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;variable_value&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#user-goal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  "Interpolations" Showing data property value
&lt;/h3&gt;

&lt;p&gt;"Interpolations" is a fancy name of handlebars, if you want to show your variable value into HTML. Just use double curly braces and write the variable name which you had declared on the data property.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{{ variable_name }}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;"Interpolations" tells Vue to replace the variable name with the actual value of it. so you can't use "Interpolations" outside Vue mounted section.&lt;/p&gt;
&lt;h3&gt;
  
  
  "v-bind" attribute of Vue
&lt;/h3&gt;

&lt;p&gt;Well, sometimes we need to pass value to Html attribute. For example, let's say you want to return a link to an anchor tag 'href' attribute, but if you use "Interpolations" it won't work. You need to use the "v-bind" attribute for that.&lt;br&gt;
"v-bind" is a Vue attribute that helps to bind any Html attribute to Vue variables.  Example :&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;v-bind:href=&lt;/span&gt;&lt;span class="s"&gt;"variable_name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Link &lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;P.S: There are more uses of v-bind and we can use the shorter version of v-bind, But for now, let's stick with this.&lt;/p&gt;
&lt;h3&gt;
  
  
  "v-html" attribute of Vue
&lt;/h3&gt;

&lt;p&gt;Now let's say you want to show an Html code using a variable. If you use only "Interpolations" it will show markup value and won't fulfill the purpose. For that, you need to use v-html attribute.&lt;br&gt;
Example:&lt;br&gt;
In app.js&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;variable_name&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;h1&amp;gt; Hello this is value &amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#user-goal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In index.html&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;     &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;v-html=&lt;/span&gt;&lt;span class="s"&gt;"variable_name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  "methods" property of Vue object
&lt;/h3&gt;

&lt;p&gt;Till now, we have used only static data. We need to add some dynamic feel to it. To do this, we need to use the "methods" property of the Vue object. "methods" is a predefined property that accepts only  JS objects that hold the collection of functions.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;variable_name&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;h1&amp;gt; Hello this is value &amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;function_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="c1"&gt;//do something&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#user-goal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We can use direct methods in "Interpolations"&lt;br&gt;
In index.html&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;     &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; {{ function_name() }}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Use "data" property into "methods"
&lt;/h3&gt;

&lt;p&gt;Basically we need to use variable into methods for that we just need to use "$this" keyword.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;variable_name&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;h1&amp;gt; Hello this is value &amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;function_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;$this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;variable_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;new value&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#user-goal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  Github Practice Code
&lt;/h1&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Tahsin-Ahmed52225"&gt;
        Tahsin-Ahmed52225
      &lt;/a&gt; / &lt;a href="https://github.com/Tahsin-Ahmed52225/100days-with-Vue"&gt;
        100days-with-Vue
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>vue</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Learning Vue JS</title>
      <dc:creator>Tahsin Ahmed</dc:creator>
      <pubDate>Thu, 18 Nov 2021 10:25:56 +0000</pubDate>
      <link>https://dev.to/tahsin52225/starting-day-01-learning-vue-js-3f86</link>
      <guid>https://dev.to/tahsin52225/starting-day-01-learning-vue-js-3f86</guid>
      <description>&lt;p&gt;Hello World,&lt;br&gt;
I was curious to learn Vue.Js for a long time, But unfortunately, I couldn't manage time to start this.&lt;br&gt;
So I took a challenge to Learn Vue.Js. I will be describing what I have learned and also going to share codes with you.&lt;br&gt;
I would appreciate any kind of advise, remarks and Highly appreciate if you guys join with me in this  journey&lt;br&gt;
Wish me Luck &amp;lt;3&lt;/p&gt;

</description>
      <category>vue</category>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to increase max upload size in All in one wp migration plugin</title>
      <dc:creator>Tahsin Ahmed</dc:creator>
      <pubDate>Sun, 04 Apr 2021 07:41:22 +0000</pubDate>
      <link>https://dev.to/tahsin52225/how-to-increase-max-upload-size-in-all-in-one-wp-migration-plugin-2moh</link>
      <guid>https://dev.to/tahsin52225/how-to-increase-max-upload-size-in-all-in-one-wp-migration-plugin-2moh</guid>
      <description>&lt;p&gt;While migrating WordPress site from local environment to server or server to server All in one wp migration is one of the best options,&lt;br&gt;
But the problem is it has an upload limit of 512M which is not enough while working with a large project. To exceed this limit it offers a paid solution.&lt;br&gt;
Increasing PHP and httaccess file upload limit doesn't work on it.&lt;br&gt;
To extend this we have to use an older version of this plugin &lt;br&gt;
I recommend Version 6.77 because after that this plugin restricted some features that are use full.&lt;br&gt;
&lt;a href="http://tahsinahmed.com/plugin/"&gt;Download Link&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;After installing this, Goto &lt;/p&gt;

&lt;p&gt;wp-content &amp;gt; plugins &amp;gt; all-in-one-migration &amp;gt; constant.php &lt;/p&gt;

&lt;p&gt;Change this value according to your need &lt;/p&gt;

&lt;h4&gt;
  
  
  define('AI1WM_MAX_FILE_SIZE', 1024 * 1024 * 1024);
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;PS: values are in bytes&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oola your upload limit is extended.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>php</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
