<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shubham &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/author/shubhamdev/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Mon, 20 Sep 2021 13:03:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>One To One Relationship in Laravel</title>
		<link>https://www.bestdevops.com/one-to-one-relationship-in-laravel/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Mon, 20 Sep 2021 11:51:08 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21538</guid>

					<description><![CDATA[What is One To One relationships and usage of hasOne() and belongsTo() ? One to one relationships are very straightforward [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">What is One To One relationships and usage of hasOne() and belongsTo() ?</h2>



<ul class="wp-block-list"><li>One to one relationships are very straightforward in Laravel. Make sure that one of the tables has a&nbsp;<strong>key</strong>&nbsp;that references the id of the other table. For example, an &#8216;address&#8217; table will have a field called user_id . That will reference the users_id field.</li></ul>



<ul class="wp-block-list"><li>A one-to-one relationship exists&nbsp;<strong>when each row in one table has only one related row in a second table</strong>. For example, a business might decide to assign one office to exactly one employee. Thus, one employee can have only one office. The same business might also decide that a department can have only one manager.</li></ul>



<ul class="wp-block-list"><li>A <strong>husband- wife </strong>relationship is the best example of One To One Relationship. There are two functions uses <strong>hasOne() </strong>and <strong>belongsTo(), </strong>both are related to each other. A belongsTo()&nbsp;<strong>relationship matches a related table&#8217;s &#8216;id&#8217;</strong>&nbsp;to a &#8216;localKey&#8217; field on &#8216;this&#8217; model. Another way to think about it is the belongsTo() relationship should live on the model that has the field that links to the related tables id. Basic syntax of both uses in Models:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-javascript"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Customer</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Model</span>
</span>{
  public <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">mobile</span>(<span class="hljs-params"></span>)
  </span>{
    <span class="hljs-keyword">return</span> $<span class="hljs-keyword">this</span>-&gt;hasOne(Mobile:<span class="hljs-class"><span class="hljs-keyword">class</span>)</span>;      <span class="hljs-comment">//customer and mobile relationship in a model/table.</span>
  }
}</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Mobile</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Model</span>
</span>{

    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">customer</span><span class="hljs-params">()</span>
    </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-keyword">$this</span>-&gt;belongsTo(Customer::class);   <span class="hljs-comment">//relationship from mobile to customer</span>
    }
}</code></span></pre>


<h2 class="wp-block-heading">How do I save a one to one relationship in laravel ?</h2>



<ul class="wp-block-list"><li>Step 1 : Install Laravel and Basic Configurations. Each Laravel project needs this thing.</li><li>Step 2 : Create Migration and Model. </li><li>Step 3 : Setup One To One Relationship. </li><li>Step 4 : Inverse Of The Relationship. </li><li>Step 5 : Insert Records. </li><li>Step 6 : Retrieve Records.</li><li>Step 7: Update Records. </li><li>Step 8 : Delete Records.</li></ul>



<ul class="wp-block-list"><li>Firstly create your laravel project and make  two Models, Migrations and Conrollers by: </li></ul>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">make</span><span class="hljs-selector-pseudo">:model</span> <span class="hljs-selector-tag">Customer</span> <span class="hljs-selector-tag">-mc</span></code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">make</span><span class="hljs-selector-pseudo">:model</span> <span class="hljs-selector-tag">Mobile</span> <span class="hljs-selector-tag">-mc</span></code></span></pre>


<ul class="wp-block-list"><li>Now goto both migration table &amp; create a schema.</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">     Schema::create(<span class="hljs-string">'customers'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(Blueprint $table)</span>
         </span>{
            $table-&gt;id();
            $table-&gt;string(<span class="hljs-string">'name'</span>);                     <span class="hljs-comment">//costomize</span>
            $table-&gt;string(<span class="hljs-string">'email'</span>);
            $table-&gt;timestamps();
        });</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php">Schema::create(<span class="hljs-string">'mobiles'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(Blueprint $table)</span> </span>{
            $table-&gt;id();
            $table-&gt;string(<span class="hljs-string">'model'</span>);                             <span class="hljs-comment">//costomize</span>
            $table-&gt;timestamps();

            $table-&gt;unsignedBigInteger(<span class="hljs-string">'customer_id'</span>);                   <span class="hljs-comment">//customize to link id from          </span>
            $table-&gt;foreign(<span class="hljs-string">'customer_id'</span>)-&gt;references(<span class="hljs-string">'id'</span>)-&gt;on(<span class="hljs-string">'customers'</span>);
        });</code></span></pre>


<p class="wp-block-paragraph">See the migration table of customers &amp; mobiles and also its foreign key &amp; index. The id of customer_table to be extends in mobile_table.</p>



<p class="wp-block-paragraph"></p>



<ul class="wp-block-list" id="block-914d075b-614e-4b6a-8aba-3edb2c4ca7e6"><li>Create a relation in Customer model b/w customer and mobile by <strong>hasOne()</strong> which are showing above, as well as create two method in CustomerController first insert the data after making both model object and showing the data.</li></ul>


<pre id="block-bda0268c-6121-4608-9a33-3dc9b8978867" class="wp-block-code"><span><code class="hljs language-php">    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add_customer</span><span class="hljs-params">()</span>

    </span>{

    

        $customer = <span class="hljs-keyword">new</span> Customer();

        $customer-&gt;name=<span class="hljs-string">"sam"</span>;

        $customer-&gt;email=<span class="hljs-string">"sam@gmail.com"</span>;

        $customer-&gt;save();

        

        $mobile = <span class="hljs-keyword">new</span> Mobile();

        $mobile-&gt;model = <span class="hljs-string">"oppo12"</span>;

        $customer-&gt;mobile()-&gt;save($mobile);   <span class="hljs-comment">//save mobile on customer</span>


        <span class="hljs-keyword">return</span> $customer;
   }</code></span></pre>


<p class="wp-block-paragraph" id="block-73cff152-ad2d-4b9f-b63d-34d8a4e1e72f">In this Controller, create a another method to showing mobile_data from customer_id:</p>


<pre id="block-4ded3b58-495c-4f21-acec-bb3b3ae30966" class="wp-block-code"><span><code class="hljs language-php">    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">show_mobile</span><span class="hljs-params">($id)</span>

    </span>{

        $mobile = Customer::find($id)-&gt;mobile;


        <span class="hljs-keyword">return</span> $mobile;

        

     }</code></span></pre>


<ul class="wp-block-list" id="block-18b40637-952c-49bd-a6be-dc1e984b32df"><li>Goto routes &#8216;web.php&#8217; &amp; makes routes for customer and mobile to display one by one in url:</li></ul>


<pre id="block-65090416-c675-46e7-95d4-f4aa78953247" class="wp-block-code"><span><code class="hljs language-php">Route::get(<span class="hljs-string">'add-customer'</span>,&#91;CustomerController::class,<span class="hljs-string">'add_customer'</span>]);



Route::get(<span class="hljs-string">'show-mobile/{id}'</span>,&#91;CustomerController::class,<span class="hljs-string">'show_mobile'</span>]);

Route::get(<span class="hljs-string">'show-customer/{id}'</span>,&#91;MobileController::class,<span class="hljs-string">'show_customer'</span>]);</code></span></pre>


<ul class="wp-block-list" id="block-8e84f0c0-af3b-4a90-8a26-e85ad647787a"><li>Similar, create a relation in Mobile model b/w mobile &amp; customer by above <strong>belongsTo()</strong> and create a method in MobileController for showing data by mobile_id.</li></ul>


<pre id="block-139f306d-b230-449e-adf5-2aacb9d93247" class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">show_customer</span><span class="hljs-params">($id)</span>

    </span>{

        $customer = Mobile::find($id)-&gt;customer;

        <span class="hljs-keyword">return</span> $customer;  


    }</code></span></pre>


<p class="wp-block-paragraph" id="block-278fd2f4-676f-4020-baa1-8f1d67ff4d5a">Finally there is relationship between Customer and Mobile. Remember we don&#8217;t forget to import both models in both controller class and controller in routes.</p>


<pre id="block-4a86c3a2-c598-4b8d-a03c-9f3d3c91e726" class="wp-block-code"><span><code class="hljs language-php">&lt;strong&gt;<span class="hljs-keyword">For</span> Controllers&lt;/strong&gt;:
<span class="hljs-keyword">use</span> <span class="hljs-title">App</span>\<span class="hljs-title">Models</span>\<span class="hljs-title">Customer</span>;

<span class="hljs-keyword">use</span> <span class="hljs-title">App</span>\<span class="hljs-title">Models</span>\<span class="hljs-title">Mobile</span>;</code></span></pre>

<pre id="block-18a1f2c3-6ccc-4f95-9e88-32510df194c9" class="wp-block-code"><span><code class="hljs language-php">&lt;strong&gt;<span class="hljs-keyword">For</span> routes:&lt;/strong&gt;
<span class="hljs-keyword">use</span> <span class="hljs-title">App</span>\<span class="hljs-title">Http</span>\<span class="hljs-title">Controllers</span>\<span class="hljs-title">CustomerController</span>;

<span class="hljs-keyword">use</span> <span class="hljs-title">App</span>\<span class="hljs-title">Http</span>\<span class="hljs-title">Controllers</span>\<span class="hljs-title">MobileController</span>;</code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Simple view of add file into git repository</title>
		<link>https://www.bestdevops.com/simple-view-of-add-file-into-git-repository/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Fri, 17 Sep 2021 11:52:20 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21518</guid>

					<description><![CDATA[How to add File in Git repositery or import project into Git ? Install Git, use git-bash and goto git [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h2 class="wp-block-heading">How to add File in Git repositery or import project into Git ?</h2>



<ul class="wp-block-list"><li>Install Git, use git-bash and goto git directory into git-bash by:<ul><li>$ cd c:/git</li></ul></li></ul>



<ul class="wp-block-list"><li>Now open &#8216;Git-hub&#8217; in browser or software and just create a &#8216;new&#8217; repository by clicking create repository with new     repository name. you can add readme file. This &#8216;repository folder&#8217; is to be showing on git directory.<ul><li>github/login</li></ul></li><li>Now open git-base and enter the two commands one by on:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">$ git config --<span class="hljs-keyword">global</span> user.name <span class="hljs-string">"your-name"</span>
$ git config --<span class="hljs-keyword">global</span> user.email <span class="hljs-string">"your-mail"</span></code></span></pre>


<ul class="wp-block-list"><li>Now copy the path of &#8220;url&#8221; of repository from github and paste with command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">$ git <span class="hljs-keyword">clone</span> your_url</code></span></pre>


<ul class="wp-block-list"><li>Now the repo clone file copied in your git directory, you can see by ls command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">$ ls</code></span></pre>


<ul class="wp-block-list"><li>Now the repo clone file copied in your git directory, you can see by ls command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">$ git add your_file</code></span></pre>


<ul class="wp-block-list"><li>And check it status by:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">$ git status</code></span></pre>


<ul class="wp-block-list"><li>When you want to commit file in your git, you just enter the command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-javascript">$ git commit -m <span class="hljs-string">"commit"</span> your_file</code></span></pre>


<ul class="wp-block-list"><li>At the end, complete object set up by the command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">$ git push -u origin main</code></span></pre>


<p class="wp-block-paragraph">Finally, we commit the files into your repository, this is basic view of git repository.</p>
</div></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Eloquent ORM Model for Database in Laravel</title>
		<link>https://www.bestdevops.com/eloquent-orm-model-for-database-in-laravel/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Thu, 16 Sep 2021 12:56:18 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21512</guid>

					<description><![CDATA[What is Laravel eloquent ORM ? Laravel includes Eloquent,&#160;an object-relational mapper&#160;(ORM) that makes it enjoyable to interact with your database. [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is Laravel eloquent ORM ?</h3>



<p class="wp-block-paragraph">Laravel includes Eloquent,&nbsp;<strong>an object-relational mapper</strong>&nbsp;(ORM) that makes it enjoyable to interact with your database. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well. The Eloquent ORM included with Laravel provides&nbsp;<strong>a simple Active Record implementation for working with your database</strong>. Each database table has a corresponding &#8220;Model&#8221; which is used to interact with that table. Before getting started, be sure to configure a database connection in config/database . </p>



<h3 class="wp-block-heading">Why we use eloquent ORM ?</h3>



<p class="wp-block-paragraph">Eloquent is an ORM, which means <strong>can automatically handle the relationships of your models for you</strong>. You can retrieve related models without writing complex queries. You can even retrieve database information without any kind of database knowledge at all. while <strong>Object–relational mapping</strong> (ORM, O/RM, and O/R mapping tool) in computer science is a programming technique for converting data between incompatible type systems using object-oriented programming languages.</p>



<h3 class="wp-block-heading">How we use ORM model for create and show columns in migration table ? </h3>



<ul class="wp-block-list"><li>Firstly create a database if you want then customize it your project <strong>.env </strong>.</li></ul>



<ul class="wp-block-list"><li>After that, create a migration table, Controller class and Model class by just a command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan make: model Employee -mc </code></span></pre>


<ul class="wp-block-list"><li>Then create a schema into migration table and migrate it:</li></ul>



<ul class="wp-block-list"><li>After that you just open Controller class and import model class as &#8220;<strong>use App\Models\</strong>Employee&#8221; and create two anonymous class either <strong>firstOrCreate()</strong> or <strong>firstOrNew()</strong> into controller class as: </li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">$employee = Employee :: &lt;strong&gt;firstOrCreate&lt;/strong&gt;
(
   &#91;<span class="hljs-string">'name'</span> =&gt; <span class="hljs-string">"shubham"</span>],
   &#91;<span class="hljs-string">'email'</span>=&gt;<span class="hljs-string">"shubham@gmail.com"</span>,<span class="hljs-string">'city'</span>=&gt;<span class="hljs-string">"allahabad"</span>,<span class="hljs-string">'marks'</span>=&gt; <span class="hljs-string">"50"</span>]  
);</code></span></pre>


<ul class="wp-block-list"><li>While, in firstOrNew() you should be add <strong>save()</strong> for fetching and inserting a data:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">

$employee = Employee :: &lt;strong&gt;firstOrNew&lt;/strong&gt;
(
   &#91;<span class="hljs-string">'name'</span> =&gt; <span class="hljs-string">"shubham"</span>],
   &#91;<span class="hljs-string">'email'</span>=&gt;<span class="hljs-string">"shubham@gmail.com"</span>,<span class="hljs-string">'city'</span>=&gt;<span class="hljs-string">"allahabad"</span>,<span class="hljs-string">'marks'</span>=&gt; <span class="hljs-string">"50"</span>]  
);
  $employee -&gt; save();
</code></span></pre>


<ul class="wp-block-list"><li>Before all this, you must be added <strong>fillable property</strong> into model class for assigning the data which is:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-keyword">protected</span> $fillable = &#91;<span class="hljs-string">'name'</span>,<span class="hljs-string">'email'</span>,<span class="hljs-string">'city'</span>,<span class="hljs-string">'salary'</span>]; </code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create Laravel Migration table into a Database</title>
		<link>https://www.bestdevops.com/create-laravel-migration-table-into-a-database/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Wed, 15 Sep 2021 12:02:27 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21462</guid>

					<description><![CDATA[1. What are Migrations and Migration table in Laravel? Laravel Migration is an essential feature in Laravel that&#160;allows you to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">1. What are Migrations and Migration table in Laravel?</h3>



<p class="wp-block-paragraph">Laravel Migration is an essential feature in Laravel that&nbsp;<strong>allows you to </strong>&#8220;<strong>easily create a table in your database</strong>&#8220;. It allows you to create and modify the application&#8217;s database schema. You can modify the table by adding a new column or deleting an existing column. Migrations are&nbsp;<strong>like version control for your database</strong>. Migration tables are&nbsp;<strong>files that are created by an administrator</strong>.</p>



<h3 class="wp-block-heading">2. Why do we use migrations?</h3>



<p class="wp-block-paragraph">Another common reason for migration is&nbsp;<strong>to move from an outdated system or legacy systems to a system that is designed for modern data needs</strong>. In the age of big data, new storage techniques are a necessity. For example, a company might choose to move from a legacy SQL database to a data lake or another flexible system.</p>



<h3 class="wp-block-heading">3. What are the two essential method and it&#8217;s use?</h3>



<p class="wp-block-paragraph">There are two methods, first is <strong>up()</strong> method and second is <strong>down()</strong> method. In up() method we create an schema like column of create_table. while in down() method, we rollback a current migration table. in other way we can say both method are opposite to each other. One create a table and second drop the table. Take a look both methods operation:</p>


<pre class="wp-block-code"><span><code class="hljs language-php"><span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> &lt;<span class="hljs-title">strong</span>&gt;<span class="hljs-title">up</span><span class="hljs-params">()</span>&lt;/<span class="hljs-title">strong</span>&gt;   //<span class="hljs-title">create</span> <span class="hljs-title">a</span> <span class="hljs-title">schema</span> <span class="hljs-title">of</span> <span class="hljs-title">a</span> <span class="hljs-title">table</span>
    </span>{
        Schema::create(<span class="hljs-string">'table_name'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(Blueprint $table)</span> </span>{
            $table-&gt;id();

            .
            .
            $table-&gt;timestamps();
        });
    }
  

    <span class="hljs-keyword">public</span> <span class="hljs-function"><span class="hljs-keyword">function</span> &lt;<span class="hljs-title">strong</span>&gt;<span class="hljs-title">down</span><span class="hljs-params">()</span>&lt;/<span class="hljs-title">strong</span>&gt;       //<span class="hljs-title">use</span> <span class="hljs-title">for</span> <span class="hljs-title">the</span> <span class="hljs-title">rollback</span> <span class="hljs-title">the</span> <span class="hljs-title">table</span>.
    </span>{
        Schema::dropIfExists(<span class="hljs-string">'table_name'</span>);
    }</code></span></pre>


<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading">3. How to create Migrations table and also migrate table?</h3>



<ul class="wp-block-list"><li>Firstly we create a migration table into a database by just entering a command :</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan make: migration create_yourtable</code></span></pre>


<ul class="wp-block-list"><li>Second time, we create a schema into up() of the table which comes from migration.</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">Schema::create(<span class="hljs-string">'yourtable'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(Blueprint $table)</span> </span>{
            $table-&gt;id();            <span class="hljs-comment">//it's autogenerated</span>
            $table-&gt;String(<span class="hljs-string">'name)
           
            $table-&gt;timestamps();
        });</span></code></span></pre>


<ul class="wp-block-list"><li>At the last, we just migrate the migration table by:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan migrate</code></span></pre>


<ul class="wp-block-list"><li>we can migrate a single table by a command into terminal:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-javascript">php artisan migrate --path=<span class="hljs-regexp">/database/mig</span>rations/<span class="hljs-number">2020</span>_04_01_064006_create_posts_table.php</code></span></pre>


<ul class="wp-block-list"><li>We can also check the status of current migration table by:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan migrate: status</code></span></pre>


<ul class="wp-block-list"><li>Remember that, we can rollback the current migration table by simple command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan migrate: rollback</code></span></pre>


<p class="wp-block-paragraph">Before migration we shouldn&#8217;t forget to customise our database name from <strong>.env</strong> that&#8217;s it.</p>
</div></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Introduction to &#8216;CRUD&#8217; Operation in Laravel</title>
		<link>https://www.bestdevops.com/introduction-to-crud-operation-in-laravel/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Mon, 13 Sep 2021 04:46:03 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21075</guid>

					<description><![CDATA[What is CRUD and its purpose ? The full form meaning of CRUD is &#8220;Create&#8221; &#8220;Retrieve&#8221; &#8220;Update&#8221; and &#8220;Delete&#8220;. In [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading">What is CRUD and its purpose ?</h3>



<p class="wp-block-paragraph">The full form meaning of CRUD is &#8220;<strong>Create</strong>&#8221; &#8220;<strong>Retrieve</strong>&#8221; &#8220;<strong>Update</strong>&#8221; and &#8220;<strong>Delete</strong>&#8220;. In computer programming, create, read, update, and delete (CRUD) are&nbsp;<strong>the four basic operations of persistent storage</strong>. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information using computer-based forms and reports. CRUD operations are basic data manipulation for database.</p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/09/image-23.png" alt="" class="wp-image-21076" width="418" height="156" srcset="https://www.bestdevops.com/wp-content/uploads/2021/09/image-23.png 367w, https://www.bestdevops.com/wp-content/uploads/2021/09/image-23-300x112.png 300w" sizes="(max-width: 418px) 100vw, 418px" /></figure>



<p class="wp-block-paragraph"><strong>The ability to create, read, update and delete items in a web application</strong>&nbsp;is crucial to most full stack projects. CRUD is too important to be ignored, so learning it first can really improve confidence within unfamiliar stacks.</p>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading">Why to use CRUD using SQL query builder?</h3>



<p class="wp-block-paragraph">Laravel is described by its creators as the framework for web artisans. It&#8217;s based on the MVC (Model-View-Controller) pattern and can be used for&nbsp;<strong>easily creating apps for making CRUD</strong>&nbsp;(Create, Retrieve, Update, Delete) operations against a database. For example, if we&#8217;re creating a store front, blog posting page, todo list or social media clone, without CRUD actions we&#8217;ll get stuck very quickly.</p>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://www.diigo.com/file/image/bbccosoazescrcppsbzdqddocre/Laravel+5.7+CRUD+Tutorial.jpg" alt="PHP Laravel 7/6 Tutorial: CRUD Example App with Bootstrap 4 and MySQL  Database | Techiediaries" width="471" height="260" /><figcaption>We&#8217;ve already learned how to perform create (i.e. insert), read (i.e. select), update and delete operations in previous chapters. It is&nbsp;used to describe&nbsp;<strong>user interface conventions that facilitate viewing, searching, and changing information using computer-based forms and reports</strong>.</figcaption></figure>
</div></div>
</div></div>



<h2 class="wp-block-heading">How to use CRUD operation using Query builder in Laravel ?</h2>



<p class="wp-block-paragraph">We operate CRUD functions in six steps like:</p>



<ul class="wp-block-list"><li>Step 1 : Install Laravel 8.</li><li>Step 2: Database Configuration.</li><li>Step 3: Create Migration. </li><li>Step 4: Add Resource Route. </li><li>Step 5: Add Controller and Model. </li><li>Step 6: Add Blade Files.</li></ul>



<p class="wp-block-paragraph"><strong>Firstly create a database in your XAMPP server.</strong></p>



<ul class="wp-block-list"><li> Open XAMPP and start mysql as well as apache server. </li><li>Then hit localhost in url for opening phpmyadmin and create a database. </li></ul>



<p class="wp-block-paragraph">Ne<strong>xt, create a project and migration table.</strong></p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<ul class="wp-block-list"><li>Open VScode application and create a fresh laravel project by entering a simple command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-javascript">laravel <span class="hljs-keyword">new</span> your_project</code></span></pre></div></div>



<ul class="wp-block-list"><li>After that, go to the project directory and entering the command:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan make: migration createmytable </code></span></pre>


<ul class="wp-block-list"><li>Open this migration table  and just create a schema for a table like:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">Schema::create(<span class="hljs-string">'tablename'</span>,<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(Blueprint $table)</span>
</span>{
  $table-&gt;id();
  $table-&gt;String(<span class="hljs-string">'col1'</span>);
  $table-&gt;String(<span class="hljs-string">'col2'</span>);
  .
  .
});</code></span></pre>


<ul class="wp-block-list"><li>After that , you just migrate it by entering &#8216;<strong>php artisan migrate</strong>&#8216;.</li></ul>



<h3 class="wp-block-heading">Next, create a Controller class and mentioned it in routes.</h3>



<ul class="wp-block-list"><li>Just enter a command into terminal. it create all CRUD methods in controller class:</li></ul>


<pre class="wp-block-code"><span><code class="hljs">php artisan make: controller mycontroller -r</code></span></pre>


<ul class="wp-block-list"><li>Before CRUD operation, we just make main view file by adding simple css, js bootstrap. then we insert the code into index() to view the table.</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">index()
{
  $table = DB::table(<span class="hljs-string">'tablename'</span>) -&gt; get();
  <span class="hljs-keyword">return</span> view (<span class="hljs-string">'mainblade'</span>,&#91;<span class="hljs-string">'mytable'</span>=&gt;table]);
}</code></span></pre>


<ul class="wp-block-list"><li>while in create() , you just write a schema in create method like insert query: </li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">create(Request $request)
{
  DB::table(<span class="hljs-string">'tablename'</span>)-&gt;insert(
  &#91; col1 =&gt;$request-&gt;col1; 
    col2 =&gt;$request-&gt;col2; 
    .
    .
  ]);
 <span class="hljs-keyword">return</span> redirect (route(<span class="hljs-string">'index'</span>))-&gt;with(<span class="hljs-string">'status'</span>,<span class="hljs-string">"Data created"</span>);
}</code></span></pre>


<ul class="wp-block-list"><li>To edit/update the data, just write the code into edit() and update(). </li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">edit()
{
 $table = DB::table(<span class="hljs-string">'tablename'</span>)-&gt;find($id);
 <span class="hljs-keyword">return</span> view(<span class="hljs-string">'editblade'</span>,&#91;<span class="hljs-string">'mytable'</span>=&gt;$table]);
}</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-php">update(Request $request,$id)
{
  DB::table(<span class="hljs-string">'tablename'</span>)-&gt;where(<span class="hljs-string">'id'</span>,$id)-&gt;update(
  &#91;
    <span class="hljs-string">'col1'</span> =&gt; $request-&gt;col1,
    <span class="hljs-string">'col2'</span> =&gt; $request-&gt;col2,
     .
     .
  ]);
  <span class="hljs-keyword">return</span> redirect(route(<span class="hljs-string">'index'</span>))-&gt;with(<span class="hljs-string">'status'</span>,<span class="hljs-string">"Data updated"</span>);
}</code></span></pre>


<ul class="wp-block-list"><li>At the end, we can delete the table by using delete query in destroy method of Controller class like:</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-php">destroy()
{
 DB::table(<span class="hljs-string">'tablename'</span>)-&gt;where(<span class="hljs-string">'id'</span>, $id)-&gt;delete();
 <span class="hljs-keyword">return</span> redirect(route(<span class="hljs-string">'index'</span>))-&gt;with(<span class="hljs-string">'status'</span>, <span class="hljs-string">"Data deleted"</span>)
}</code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using of Variable, Keys and Tuples</title>
		<link>https://www.bestdevops.com/using-of-variable-keys-and-touples/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Tue, 07 Sep 2021 08:28:37 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=21049</guid>

					<description><![CDATA[What is variable in programming languages? In computer programming, a variable is&#160;a storage location (identified by a memory address) paired [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading">What is variable in programming languages?</h3>



<ul class="wp-block-list"><li>In computer programming, a variable is&nbsp;<strong>a storage location (identified by a memory address) paired with an associated            symbolic name</strong>.</li><li>It contains some known or unknown quantity of information referred to as a value.</li><li> Finally A variable is a <strong>container for a particular type of data</strong> (like integer, float, String etc).</li></ul>



<p class="wp-block-paragraph">  <strong>example</strong>: Java:: int num, String name;</p>



<p class="wp-block-paragraph">                    Php:: $num (there is not necessary for type)</p>



<p class="wp-block-paragraph">                    Kotlin:: var num, val num2;</p>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://media.geeksforgeeks.org/wp-content/uploads/20190708153106/Variables-in-C-1.jpg" alt="Variables in C++ - GeeksforGeeks" width="424" height="260" /></figure>
</div></div>
</div></div>



<h2 class="wp-block-heading">What is keys using in Php and how we use it?</h2>



<p class="wp-block-paragraph">Php is used by embedding with HTML, due to which some new features can also be added to it. The specialty of this language is that it is used to design &#8220;Dynamic website&#8221;. When a user sends a request to a php web page from his browser, in which this code resides.</p>



<p class="wp-block-paragraph"></p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow"><pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
  &lt;h1&gt;Welcome to {{$name}} &lt;/h1&gt;     <span class="hljs-comment">//$name is variable but it comes from name key.</span>
  @<span class="hljs-keyword">include</span> (<span class="hljs-string">'address'</span>,&#91;<span class="hljs-string">'&lt;strong&gt;pin&lt;/strong&gt;'</span>=&gt;<span class="hljs-number">212303</span>])    <span class="hljs-comment">//here, pin is an key which is not use in this page.</span>
<span class="hljs-meta">?&gt;</span></span></code></span></pre>


<p class="wp-block-paragraph">In the PHP code: $featured is the associative array being looped through, and as $key =&gt; $value means that each time the loop runs and selects a key-value pair from the array, it stores the key in the local $key variable to use inside the loop block and the value in the local $value variable.</p>


<pre class="wp-block-code"><span><code class="hljs language-php">**In <span class="hljs-keyword">foreach</span> <span class="hljs-keyword">use</span> $<span class="hljs-title">key</span> =&gt; $<span class="hljs-title">value</span>

<span class="hljs-title">foreach</span>($<span class="hljs-title">featured</span> <span class="hljs-title">as</span> $<span class="hljs-title">key</span> =&gt; $<span class="hljs-title">value</span>)
{
  <span class="hljs-title">echo</span> $<span class="hljs-title">value</span>&#91;'<span class="hljs-title">name</span>'];
}
</code></span></pre></div></div>



<h2 class="wp-block-heading">What is use of tuple in Programming language?</h2>



<p class="wp-block-paragraph">Tuple is used to store multiple objects in a single variable. Tuple is similar to list because the value of the objects stored in the list can be changed, whereas tuple is immutable so the value of the objects stored in the tuple cannot be changed.</p>



<p class="wp-block-paragraph">example: </p>



<pre class="wp-block-preformatted">[Geeks, 123, &amp;#*@]
key value[A, B]</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Manual indexing of an Array in Php!</title>
		<link>https://www.bestdevops.com/manual-indexing-of-an-array-in-php/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Thu, 26 Aug 2021 04:56:59 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19768</guid>

					<description><![CDATA[What is Array&#8217;s Manual indexing? when we create our own indexing in an array is known manual indexing. in which [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading"><strong>What is </strong>Array&#8217;s Manual indexing?</h3>



<ol class="wp-block-list"><li>when we create our own indexing in an array is known manual indexing. in which we change default indexing starting from zero &#8216;0&#8217; index. we can keep values in our own indexing using &#8220;<strong>=&gt;</strong>&#8220;this operator. for example.</li><li>Syntax &#8220;<strong>index =&gt; values</strong>&#8220;, separated by commas, define index and values. </li><li>Index may be of type string or integer. When index is omitted, an integer index is automatically generated, starting at 0. If index is an integer, next generated index will be the biggest integer index + 1.</li><li> Note that when two identical index are defined, the last overwrite the first.</li></ol>
</div></div>



<p class="wp-block-paragraph"><strong>Example #1&nbsp;array()&nbsp;example</strong></p>



<pre class="wp-block-preformatted">&lt;?php
     $fruits = array (
    "fruits"  =&gt; array("a" =&gt; "orange", "b" =&gt; "banana", "c" =&gt; "apple"),
    "numbers" =&gt; array(1, 2, 3, 4, 5, 6),
    "holes"   =&gt; array("first", 5 =&gt; "second", "third")
);
?&gt;</pre>



<p class="wp-block-paragraph"><strong>Example #2 Automatic index with&nbsp;array()</strong></p>



<pre class="wp-block-preformatted">&lt;?php
    $array = array(1, 1, 1, 1,  1, 8 =&gt; 1,  4 =&gt; 1, 9 =&gt;19, 3 =&gt; 13);
    print_r($array);
?&gt;</pre>



<p class="wp-block-paragraph">The above example will output:</p>



<pre class="wp-block-preformatted">Array
(
    [0] =&gt; 1
    [1] =&gt; 1
    [2] =&gt; 1
    [3] =&gt; 13
    [4] =&gt; 1
    [8] =&gt; 1
    [9] =&gt; 19
)</pre>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading">Why we&#8217;re using array indexing?</h3>



<p class="wp-block-paragraph">The location of an item in an array refers indexing. The INDEX function <strong>returns a value or the reference to a value from within a table or range</strong>. There are two ways to use the INDEX function: If you want to return the value of a specified cell or array of cells, see Array form. </p>



<figure class="wp-block-image is-resized"><img loading="lazy" decoding="async" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQvpRB7L1spQ-_rOCX-VEeYPYgjeO2CPIVUpw&amp;usqp=CAU" alt="The basics of the array data structure" width="356" height="161" /></figure>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="wp-block-heading">When we uses array indexing manually?</h3>



<p class="wp-block-paragraph">When data objects are stored in an array, individual objects are selected by an index that is usually a non-negative scalar integer. Indexes are also called subscripts. An index&nbsp;<strong>maps the array value to a stored object.</strong></p>
</div></div>



<figure class="wp-block-image"><img decoding="async" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ9mvtt7DhAz2-09VIsBvmul6PJbr4R0SQwsQ&amp;usqp=CAU" alt="array Index - Pristine Tech School" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using String interpolation in php</title>
		<link>https://www.bestdevops.com/string_interpolation/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Fri, 20 Aug 2021 12:24:08 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19485</guid>

					<description><![CDATA[String interpolation is quick shortcut, allowing to pop up the value of a variable into double quoted String. Remember that [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<p class="wp-block-paragraph">String interpolation is quick shortcut, allowing to pop up the value of a variable into double quoted String. Remember that any variable with &#8220;$&#8221; sign into single quote is not a variable, it just treat as a statement.</p>



<p class="wp-block-paragraph">eg.  <strong>&#8216;$num is not a variable&#8217;</strong> because num variable is written into single quote. </p>
</div></div>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
    $value= <span class="hljs-number">10</span>;
    <span class="hljs-keyword">echo</span> <span class="hljs-string">"$value is good price of the product"</span>; <span class="hljs-comment">//&lt;strong&gt;String interpolation&lt;/strong&gt;</span>
    <span class="hljs-keyword">echo</span> <span class="hljs-string">'$value is good price of the product'</span>;
<span class="hljs-meta">?&gt;</span></span></code></span></pre>


<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Here document use in php</title>
		<link>https://www.bestdevops.com/here-document-use-in-php/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Thu, 19 Aug 2021 07:35:48 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19463</guid>

					<description><![CDATA[php here document is another way to display the text. In this a token is use in which write multiple [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<p class="wp-block-paragraph">php here document is another way to display the text. In this a token is<strong> </strong>use in which write multiple line without any quotes like:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">&lt;span style=<span class="hljs-string">"color:#260ff3"</span> <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"has-inline-color"</span>&gt;<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>echo <span class="hljs-tag">&lt;&lt;&lt;<span class="hljs-attr">Token</span>
        <span class="hljs-attr">data..</span>
        <span class="hljs-attr">Token</span>;&lt;/<span class="hljs-attr">strong</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span></span></code></span></pre></div></div>
</div></div>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
  <span class="hljs-keyword">echo</span> <span class="hljs-string">&lt;&lt;&lt;MyData
       Welcome to here document   
       it is very "important" data.
       MyData;                       
  echo MyData;
?&gt;</span></span></code></span></pre>

<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="php"><span class="hljs-meta">&lt;?php</span>
$info = <span class="hljs-string">&lt;&lt;&lt;MyData
       Welcome to here document   
       it is very "important" data.
       MyData;
echo <span class="hljs-subst">$info</span>;
?&gt;</span></span></code></span></pre></div></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to run Php First program in Xampp server.</title>
		<link>https://www.bestdevops.com/how-to-run-php-first-program-in-xampp-server/</link>
		
		<dc:creator><![CDATA[Shubham]]></dc:creator>
		<pubDate>Thu, 19 Aug 2021 06:12:35 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19449</guid>

					<description><![CDATA[Step 1: First install to xampp server by official link https://www.apachefriends.org/download.html, after that you need to open server to start [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 1: </h4>



<p class="wp-block-paragraph">First install to xampp server by official link <a href="https://www.apachefriends.org/download.html">https://www.apachefriends.org/download.html</a>, after that you need to open server to start Apache server. And also start mysql for phpadmin.</p>
</div></div>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 2:</h4>



<p class="wp-block-paragraph">Now open any browser in your pc and just type this url: <strong>http://localhost</strong> and then server run for interprete any php code.</p>
</div></div>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 3:</h4>



<p class="wp-block-paragraph">Now create the project file and copy it&#8217;s directory and paste into the browser like: <strong>http://localhost/myphp/first.php</strong> before you create just a folder into c:\xampp\htdocs\myphp</p>
</div></div>
</div></div>
</div></div>
</div></div>
</div></div>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 4:</h4>



<p class="wp-block-paragraph">Let us tell you how we create php first program like:</p>
</div></div>
</div></div>


<pre class="wp-block-code"><span><code class="hljs language-xml"><span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span><span class="php"><span class="hljs-meta">&lt;?php</span>
  $name = <span class="hljs-string">"product"</span>;
  <span class="hljs-keyword">echo</span> $name;
<span class="hljs-meta">?&gt;</span></span><span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span></code></span></pre>


<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 5:</h4>



<p class="wp-block-paragraph">Now, run it into browser and you get output in next page like:</p>
</div></div>


<pre class="wp-block-code"><span><code class="hljs">product</code></span></pre>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
