<?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: Muhammad zeb Noon</title>
    <description>The latest articles on DEV Community by Muhammad zeb Noon (@muhammad_zebnoon_f85c6ea).</description>
    <link>https://dev.to/muhammad_zebnoon_f85c6ea</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%2F2192002%2F740a39e9-b9f2-470f-ada5-6ebda78e7e26.jpg</url>
      <title>DEV Community: Muhammad zeb Noon</title>
      <link>https://dev.to/muhammad_zebnoon_f85c6ea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammad_zebnoon_f85c6ea"/>
    <language>en</language>
    <item>
      <title>How to Transfer Data from PHP Form to Database in Laravel – Easy Steps for Beginners</title>
      <dc:creator>Muhammad zeb Noon</dc:creator>
      <pubDate>Sun, 20 Jul 2025 04:22:23 +0000</pubDate>
      <link>https://dev.to/muhammad_zebnoon_f85c6ea/how-to-transfer-data-from-php-form-to-database-in-laravel-easy-steps-for-beginners-g44</link>
      <guid>https://dev.to/muhammad_zebnoon_f85c6ea/how-to-transfer-data-from-php-form-to-database-in-laravel-easy-steps-for-beginners-g44</guid>
      <description>&lt;h1&gt;
  
  
  🚀 How to Transfer Data from PHP Form to Database in Laravel – Easy Steps for Beginners
&lt;/h1&gt;

&lt;p&gt;If you're new to Laravel and wondering &lt;strong&gt;how to collect form data and store it in a database&lt;/strong&gt;, you're in the right place! In this tutorial, I’ll guide you through simple, beginner-friendly steps — from creating the form to saving the data using Laravel's built-in features.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Step 1: Set Up Laravel Project
&lt;/h2&gt;

&lt;p&gt;If you haven't already installed Laravel, run this:&lt;/p&gt;

&lt;blockquote&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
composer create-project laravel/laravel myFormApp
cd myFormApp
php artisan serve
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Make sure your .env file has the correct database credentials:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;DB_CONNECTION=mysql&lt;/em&gt;&lt;br&gt;
&lt;em&gt;DB_HOST=127.0.0.1&lt;/em&gt;&lt;br&gt;
&lt;em&gt;DB_PORT=3306&lt;/em&gt;&lt;br&gt;
&lt;em&gt;DB_DATABASE=form_demo&lt;/em&gt;&lt;br&gt;
&lt;em&gt;DB_USERNAME=root&lt;/em&gt;&lt;br&gt;
&lt;em&gt;DB_PASSWORD=&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create the database manually in phpMyAdmin or your preferred DB tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Step 2: Create a Model and Migration&lt;/strong&gt;&lt;br&gt;
Let’s say we're collecting user contact information.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;php artisan make: model Contact -m&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Update the migration file in database/migrations:&lt;/p&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;public function up()&lt;br&gt;
{&lt;br&gt;
    Schema::create('contacts', function (Blueprint $table) {&lt;br&gt;
        $table-&amp;gt;id();&lt;br&gt;
        $table-&amp;gt;string('name');&lt;br&gt;
        $table-&amp;gt;string('email');&lt;br&gt;
        $table-&amp;gt;text('message');&lt;br&gt;
        $table-&amp;gt;timestamps();&lt;br&gt;
    });&lt;br&gt;
}&lt;br&gt;
_&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then run the terminal:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;gt; php artisan migrate&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎉 Final Result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;a href="http://localhost/phpmyadmin/" rel="noopener noreferrer"&gt;http://localhost/phpmyadmin/&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the "form_demo" database&lt;/li&gt;
&lt;li&gt;Check and click the "Contacts" table created&lt;/li&gt;
&lt;li&gt;Check the columns of the Table.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Laravel makes it super easy to create a database with minimal code. Whether you're building a contact form, survey, or registration system database, the process is almost the same.&lt;/p&gt;

&lt;p&gt;If you found this helpful, give it a ❤️ and follow for more Laravel beginner tips!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F45mmoapc8by1v84zz9e5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F45mmoapc8by1v84zz9e5.png" alt=" " width="262" height="148"&gt;&lt;/a&gt;&lt;br&gt;
Author: Aurangzeb – alhamrapk.com&lt;/p&gt;

</description>
      <category>programming</category>
      <category>php</category>
      <category>beginners</category>
      <category>laravel</category>
    </item>
    <item>
      <title>How to create tables in Database Using Laravel – Easy Steps for Beginners</title>
      <dc:creator>Muhammad zeb Noon</dc:creator>
      <pubDate>Sun, 20 Jul 2025 03:30:15 +0000</pubDate>
      <link>https://dev.to/muhammad_zebnoon_f85c6ea/how-to-create-tables-in-database-using-laravel-easy-steps-for-beginners-3aop</link>
      <guid>https://dev.to/muhammad_zebnoon_f85c6ea/how-to-create-tables-in-database-using-laravel-easy-steps-for-beginners-3aop</guid>
      <description>&lt;h1&gt;
  
  
  🚀 &lt;strong&gt;How to Transfer Data from PHP Form to Database in Laravel – Easy Steps for Beginners&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you're new to Laravel and wondering &lt;strong&gt;how to collect form data and store it in a database&lt;/strong&gt;, you're in the right place! In this tutorial, I’ll guide you through simple, beginner-friendly steps — from creating the form to saving the data using Laravel's built-in features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Set Up Laravel Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you haven't already installed Laravel, run this:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
composer create-project laravel/laravel myFormApp
cd myFormApp
php artisan serve
Make sure your .env file has the correct database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=form_demo
DB_USERNAME=root
DB_PASSWORD=

Create the database manually in phpMyAdmin or your preferred DB tool.

**Step 2: Create a Model and Migration**
Let’s say we're collecting user contact information
php artisan make: model Contact -m
Update the migration file in database/migrations:

public function up()
{
    Schema::create('contacts', function (Blueprint $table) {
        $table-&amp;gt;id();
        $table-&amp;gt;string('name');
        $table-&amp;gt;string('email');
        $table-&amp;gt;text('message');
        $table-&amp;gt;timestamps();
    });
}

Then run:
php artisan migrate
 check 
http://localhost/phpmyadmin/


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

&lt;/div&gt;

</description>
      <category>programming</category>
      <category>laravel</category>
      <category>beginners</category>
      <category>database</category>
    </item>
  </channel>
</rss>
