<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kadinar Novel on Medium]]></title>
        <description><![CDATA[Stories by Kadinar Novel on Medium]]></description>
        <link>https://medium.com/@kadinarnvl?source=rss-43edcabc2748------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*66utusof-LDbgfgG</url>
            <title>Stories by Kadinar Novel on Medium</title>
            <link>https://medium.com/@kadinarnvl?source=rss-43edcabc2748------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:41:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kadinarnvl/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Laravel: A Beginner’s Guide to Building Web Applications]]></title>
            <link>https://medium.com/@kadinarnvl/laravel-a-beginners-guide-to-building-web-applications-59071ac0b6f0?source=rss-43edcabc2748------2</link>
            <guid isPermaLink="false">https://medium.com/p/59071ac0b6f0</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Kadinar Novel]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 11:31:39 GMT</pubDate>
            <atom:updated>2023-02-10T11:31:39.006Z</atom:updated>
            <content:encoded><![CDATA[<p>Laravel is a free, open-source PHP framework used for web application development. With its elegant syntax and tools, Laravel makes it easy to build modern, robust applications. In this article, we will cover the basics of Laravel, including installation, project creation, and building a CRUD (Create, Read, Update, Delete) Inventory application.</p><p><strong>A. Installing Laravel</strong></p><p>Before we can start building our application, we need to install Laravel on our development machine. Here are the steps to install Laravel:</p><ol><li>Install PHP and a web server such as Apache or Nginx.</li><li>Install Composer, a dependency manager for PHP.</li><li>Open the command line and navigate to the directory where you want to install Laravel.</li><li>Run the following command to install Laravel:</li></ol><pre>composer create-project --prefer-dist laravel/laravel your-project-name</pre><p><strong>B. Creating a Laravel Project</strong></p><p>With Laravel installed, we can now create a new project. Follow these steps to create a new Laravel project:</p><ol><li>Open the command line and navigate to the directory where you want to create your project.</li><li>Run the following command to create a new Laravel project:</li></ol><pre>composer create-project --prefer-dist laravel/laravel your-project-name</pre><p>3. Navigate into your project directory by running the following command:</p><pre>cd your-project-name</pre><p>4. Start the development server by running the following command:</p><pre>php artisan serve</pre><p>Open your browser then you will see Laravel info if successful</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXU6zrby7I8wxMAuoCTNHg.png" /><figcaption>Laravel Project</figcaption></figure><p><strong>C. Building a CRUD Inventory Application</strong></p><p>Now that we have our Laravel project set up, we can start building our CRUD Inventory application. The following steps will guide you through the process:</p><ol><li>The .env file in Laravel is used to store environment-specific configuration values for your application. This file should not be committed to your version control system, as it contains sensitive information such as database credentials.</li></ol><p>To set up your .env file, follow these steps:</p><p>a. Create a copy of the .env.example file in the root directory of your Laravel application and rename it to .env.</p><p>b. Open the .env file and set the following values:</p><pre>APP_NAME=YourAppName<br>APP_ENV=local<br>APP_KEY=<br>APP_DEBUG=true<br>APP_URL=http://localhost<br><br>LOG_CHANNEL=stack<br><br>DB_CONNECTION=mysql<br>DB_HOST=127.0.0.1<br>DB_PORT=3306<br>DB_DATABASE=YourDatabaseName<br>DB_USERNAME=YourDatabaseUsername<br>DB_PASSWORD=YourDatabasePassword<br><br>BROADCAST_DRIVER=log<br>CACHE_DRIVER=file<br>QUEUE_CONNECTION=sync<br>SESSION_DRIVER=file<br>SESSION_LIFETIME=120<br><br>REDIS_HOST=127.0.0.1<br>REDIS_PASSWORD=null<br>REDIS_PORT=6379<br><br>MAIL_DRIVER=smtp<br>MAIL_HOST=smtp.mailtrap.io<br>MAIL_PORT=2525<br>MAIL_USERNAME=null<br>MAIL_PASSWORD=null<br>MAIL_ENCRYPTION=null<br><br>AWS_ACCESS_KEY_ID=<br>AWS_SECRET_ACCESS_KEY=<br>AWS_DEFAULT_REGION=us-east-1<br>AWS_BUCKET=<br><br>PUSHER_APP_ID=<br>PUSHER_APP_KEY=<br>PUSHER_APP_SECRET=<br>PUSHER_APP_CLUSTER=mt1<br><br>MIX_PUSHER_APP_KEY=&quot;${PUSHER_APP_KEY}&quot;<br>MIX_PUSHER_APP_CLUSTER=&quot;${PUSHER_APP_CLUSTER}&quot;m</pre><p>2. Create a model and a migration for the inventory item at command.</p><pre>php artisan make:model Inventory -m</pre><p>3. Open the generated migration file at database/migrations/xxx_create_inventories_table.php and add the following columns to the up method:</p><pre>public function up()<br>{<br>    Schema::create(&#39;inventories&#39;, function (Blueprint $table) {<br>        $table-&gt;id();<br>        $table-&gt;string(&#39;name&#39;);<br>        $table-&gt;integer(&#39;quantity&#39;);<br>        $table-&gt;string(&#39;description&#39;);<br>        $table-&gt;timestamps();<br>    });<br>}</pre><p>4. Run the following command to create the inventories table in the database:</p><pre>php artisan migrate</pre><p>5. At your model Inventory.php add the following methods:</p><pre>&lt;?php<br><br>namespace App\Models;<br><br>use Illuminate\Database\Eloquent\Factories\HasFactory;<br>use Illuminate\Database\Eloquent\Model;<br><br>class Inventory extends Model<br>{<br>    /**<br>     * The attributes that are mass assignable.<br>     *<br>     * @var array<br>     */<br>    protected $table = &#39;inventories&#39;;<br><br>    protected $fillable = [<br>        &#39;name&#39;, &#39;quantity&#39;, &#39;description&#39;<br>    ];<br>}</pre><p>6. Create a controller for the inventory items.</p><pre>php artisan make:controller InventoryController</pre><p>7. Open the generated controller file and add the following methods:</p><pre>&lt;?php<br><br>namespace App\Http\Controllers;<br><br>use App\Models\Inventory;<br>use Illuminate\Http\Request;<br><br>class InventoryController extends Controller<br>{<br>    /**<br>     * Display a listing of the resource.<br>     *<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function index()<br>    {<br>        $inventories = Inventory::all();<br>        return view(&#39;inventories.index&#39;, compact(&#39;inventories&#39;));<br>    }<br><br>    /**<br>     * Show the form for creating a new resource.<br>     *<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function create()<br>    {<br>        return view(&#39;inventories.create&#39;);<br>    }<br><br>    /**<br>     * Store a newly created resource in storage.<br>     *<br>     * @param  \Illuminate\Http\Request  $request<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function store(Request $request)<br>    {<br>        $request-&gt;validate([<br>            &#39;name&#39; =&gt; &#39;required&#39;,<br>            &#39;description&#39; =&gt; &#39;required&#39;,<br>            &#39;quantity&#39; =&gt; &#39;required|numeric&#39;<br>        ]);<br>        $inventory = new Inventory([<br>            &#39;name&#39; =&gt; $request-&gt;get(&#39;name&#39;),<br>            &#39;description&#39; =&gt; $request-&gt;get(&#39;description&#39;),<br>            &#39;quantity&#39; =&gt; $request-&gt;get(&#39;quantity&#39;),<br>        ]);<br>        $inventory-&gt;save();<br>        return redirect(&#39;/inventories&#39;)-&gt;with(&#39;success&#39;, &#39;Inventory item added!&#39;);<br>    }<br><br>    /**<br>     * Display the specified resource.<br>     *<br>     * @param  \App\Inventory  $inventory<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function show($id)<br>    {<br>        $inventory = Inventory::find($id);<br>        return view(&#39;inventories.show&#39;, compact(&#39;inventory&#39;));<br>    }<br><br>    /**<br>     * Show the form for editing the specified resource.<br>     *<br>     * @param  int  $id<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function edit($id)<br>    {<br>        $inventory = Inventory::find($id);<br>        return view(&#39;inventories.edit&#39;, compact(&#39;inventory&#39;));<br>    }<br><br>    /**<br>     * Update the specified resource in storage.<br>     *<br>     * @param  \Illuminate\Http\Request  $request<br>     * @param  int  $id<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function update(Request $request, $id)<br>    {<br>        $request-&gt;validate([<br>            &#39;name&#39; =&gt; &#39;required&#39;,<br>            &#39;description&#39; =&gt; &#39;required&#39;,<br>            &#39;quantity&#39; =&gt; &#39;required|integer&#39;<br>        ]);<br><br>        $inventory = Inventory::find($id);<br>        $inventory-&gt;name = $request-&gt;get(&#39;name&#39;);<br>        $inventory-&gt;description = $request-&gt;get(&#39;description&#39;);<br>        $inventory-&gt;quantity = $request-&gt;get(&#39;quantity&#39;);<br>        $inventory-&gt;save();<br><br>        return redirect(&#39;/inventories&#39;)-&gt;with(&#39;success&#39;, &#39;Inventory item updated!&#39;);<br>    }<br><br>    /**<br>     * Remove the specified resource from storage.<br>     *<br>     * @param  \App\Inventory  $inventory<br>     * @return \Illuminate\Http\Response<br>     */<br>    public function destroy($id)<br>    {<br>        $inventory = Inventory::find($id);<br>        $inventory-&gt;delete();<br>        return redirect(&#39;/inventories&#39;)-&gt;with(&#39;success&#39;, &#39;Inventory item deleted!&#39;);<br>    }<br>}</pre><p>8. Create a view for the index page of the inventory items by creating a new file resources/views/inventories/index.blade.php with the following content:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; integrity=&quot;sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm&quot; crossorigin=&quot;anonymous&quot;&gt;<br>    &lt;title&gt;Inventory&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>            &lt;div class=&quot;col-12&quot;&gt;<br>                &lt;h1 class=&quot;text-center mt-5 mb-5&quot;&gt;Inventory&lt;/h1&gt;<br>                &lt;a href=&quot;{{ url(https://medium.com/&#39;inventories/create&#39;) }}&quot; class=&quot;btn btn-primary mb-3&quot;&gt;Add Item&lt;/a&gt;<br>                @if (session(&#39;success&#39;))<br>                    &lt;div class=&quot;alert alert-success&quot;&gt;<br>                        {{ session(&#39;success&#39;) }}<br>                    &lt;/div&gt;<br>                @endif<br>                &lt;table class=&quot;table table-bordered&quot;&gt;<br>                    &lt;thead&gt;<br>                        &lt;tr&gt;<br>                            &lt;th&gt;ID&lt;/th&gt;<br>                            &lt;th&gt;Name&lt;/th&gt;<br>                            &lt;th&gt;Quantity&lt;/th&gt;<br>                            &lt;th&gt;Description&lt;/th&gt;<br>                            &lt;th&gt;Actions&lt;/th&gt;<br>                        &lt;/tr&gt;<br>                    &lt;/thead&gt;<br>                    &lt;tbody&gt;<br>                        @foreach ($inventories as $inventory)<br>                        &lt;tr&gt;<br>                            &lt;td&gt;{{ $inventory-&gt;id }}&lt;/td&gt;<br>                            &lt;td&gt;{{ $inventory-&gt;name }}&lt;/td&gt;<br>                            &lt;td&gt;{{ $inventory-&gt;quantity }}&lt;/td&gt;<br>                            &lt;td&gt;{{ $inventory-&gt;description }}&lt;/td&gt;<br>                            &lt;td&gt;<br>                                &lt;a href=&quot;{{ url(https://medium.com/&#39;inventories/&#39;.$inventory-&gt;id.&#39;&#39;) }}&quot; class=&quot;btn btn-info&quot;&gt;Show&lt;/a&gt;<br>                                &lt;a href=&quot;{{ url(https://medium.com/&#39;inventories/&#39;.$inventory-&gt;id.&#39;/edit&#39;) }}&quot; class=&quot;btn btn-warning&quot;&gt;Edit&lt;/a&gt;<br>                                &lt;form action=&quot;{{ url(https://medium.com/&#39;inventories/&#39;.$inventory-&gt;id) }}&quot; method=&quot;post&quot; class=&quot;d-inline&quot;&gt;<br>                                    @method(&#39;delete&#39;)<br>                                    @csrf<br>                                    &lt;button type=&quot;submit&quot; class=&quot;btn btn-danger&quot; onclick=&quot;return confirm(&#39;Are you sure want to delete?&#39;)&quot;&gt;Delete&lt;/button&gt;<br>                                &lt;/form&gt;<br>                            &lt;/td&gt;<br>                        &lt;/tr&gt;<br>                        @endforeach<br>                    &lt;/tbody&gt;<br>                &lt;/table&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>9. Create a view for the create page of the inventory items by creating a new file resources/views/inventories/create.blade.php with the following content:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; integrity=&quot;sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm&quot; crossorigin=&quot;anonymous&quot;&gt;<br>&lt;title&gt;Create Inventory Item&lt;/title&gt;<br><br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>            &lt;div class=&quot;col-12&quot;&gt;<br>                &lt;h1 class=&quot;text-center mt-5 mb-5&quot;&gt;Create Inventory Item&lt;/h1&gt;<br>                @if ($errors-&gt;any())<br>                    &lt;div class=&quot;alert alert-danger&quot;&gt;<br>                        &lt;ul&gt;<br>                            @foreach ($errors-&gt;all() as $error)<br>                                &lt;li&gt;{{ $error }}&lt;/li&gt;<br>                            @endforeach<br>                        &lt;/ul&gt;<br>                    &lt;/div&gt;<br>                @endif<br>                &lt;form action=&quot;{{ url(https://medium.com/&#39;inventories&#39;) }}&quot; method=&quot;post&quot;&gt;<br>                    @csrf<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;<br>                        &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;name&quot; name=&quot;name&quot; value=&quot;{{ old(&#39;name&#39;) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;quantity&quot;&gt;Quantity&lt;/label&gt;<br>                        &lt;input type=&quot;number&quot; class=&quot;form-control&quot; id=&quot;quantity&quot; name=&quot;quantity&quot; value=&quot;{{ old(&#39;quantity&#39;) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;description&quot;&gt;Description&lt;/label&gt;<br>                        &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;description&quot; name=&quot;description&quot; value=&quot;{{ old(&#39;description&#39;) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Submit&lt;/button&gt; &lt;a class=&quot;btn btn-primary&quot; href=&quot;{{ route(&#39;inventories.index&#39;) }}&quot;&gt;Back&lt;/a&gt;<br>                &lt;/form&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>10. Create a view for the edit page of the inventory items by creating a new file resources/views/inventories/edit.blade.php with the following content:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; integrity=&quot;sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm&quot; crossorigin=&quot;anonymous&quot;&gt;<br>    &lt;title&gt;Edit Inventory Item&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>            &lt;div class=&quot;col-12&quot;&gt;<br>                &lt;h1 class=&quot;text-center mt-5 mb-5&quot;&gt;Edit Inventory Item&lt;/h1&gt;<br>                @if ($errors-&gt;any())<br>                    &lt;div class=&quot;alert alert-danger&quot;&gt;<br>                        &lt;ul&gt;<br>                            @foreach ($errors-&gt;all() as $error)<br>                                &lt;li&gt;{{ $error }}&lt;/li&gt;<br>                            @endforeach<br>                        &lt;/ul&gt;<br>                        &lt;/div&gt;<br>                @endif<br>                &lt;form action=&quot;{{ url(https://medium.com/&#39;inventories/&#39;%20.%20$inventory-&gt;id) }}&quot; method=&quot;post&quot;&gt;<br>                    @csrf<br>                    @method(&#39;patch&#39;)<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;<br>                        &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;name&quot; name=&quot;name&quot; value=&quot;{{ old(&#39;name&#39;, $inventory-&gt;name) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;quantity&quot;&gt;Quantity&lt;/label&gt;<br>                        &lt;input type=&quot;number&quot; class=&quot;form-control&quot; id=&quot;quantity&quot; name=&quot;quantity&quot; value=&quot;{{ old(&#39;quantity&#39;, $inventory-&gt;quantity) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;description&quot;&gt;Description&lt;/label&gt;<br>                        &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;description&quot; name=&quot;description&quot; value=&quot;{{ old(&#39;description&#39;, $inventory-&gt;description) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Submit&lt;/button&gt; &lt;a class=&quot;btn btn-primary&quot; href=&quot;{{ route(&#39;inventories.index&#39;) }}&quot;&gt;Back&lt;/a&gt;<br>                &lt;/form&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>11. Create a view for the show page of the inventory items by creating a new file resources/views/inventories/show.blade.php with the following content:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css&quot; integrity=&quot;sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm&quot; crossorigin=&quot;anonymous&quot;&gt;<br>    &lt;title&gt;Show Inventory Item&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>            &lt;div class=&quot;col-12&quot;&gt;<br>                &lt;h1 class=&quot;text-center mt-5 mb-5&quot;&gt;Show Inventory Item&lt;/h1&gt;<br>                @if ($errors-&gt;any())<br>                    &lt;div class=&quot;alert alert-danger&quot;&gt;<br>                        &lt;ul&gt;<br>                            @foreach ($errors-&gt;all() as $error)<br>                                &lt;li&gt;{{ $error }}&lt;/li&gt;<br>                            @endforeach<br>                        &lt;/ul&gt;<br>                        &lt;/div&gt;<br>                @endif<br>                    @csrf<br>                    @method(&#39;get&#39;)<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;<br>                        &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;name&quot; name=&quot;name&quot; value=&quot;{{ old(&#39;name&#39;, $inventory-&gt;name) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;quantity&quot;&gt;Quantity&lt;/label&gt;<br>                        &lt;input type=&quot;number&quot; class=&quot;form-control&quot; id=&quot;quantity&quot; name=&quot;quantity&quot; value=&quot;{{ old(&#39;quantity&#39;, $inventory-&gt;quantity) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&quot;form-group&quot;&gt;<br>                        &lt;label for=&quot;description&quot;&gt;Description&lt;/label&gt;<br>                        &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;description&quot; name=&quot;description&quot; value=&quot;{{ old(&#39;description&#39;, $inventory-&gt;description) }}&quot;&gt;<br>                    &lt;/div&gt;<br>                    &lt;a class=&quot;btn btn-primary&quot; href=&quot;{{ route(&#39;inventories.index&#39;) }}&quot;&gt;Back&lt;/a&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>12. Here’s an example of how you might add routes to your web.php file in Laravel to handle the CRUD operations for the Inventory model:</p><pre>&lt;?php<br><br>use Illuminate\Support\Facades\Route;<br>use App\Http\Controllers\InventoryController;<br><br>/*<br>|--------------------------------------------------------------------------<br>| Web Routes<br>|--------------------------------------------------------------------------<br>|<br>| Here is where you can register web routes for your application. These<br>| routes are loaded by the RouteServiceProvider within a group which<br>| contains the &quot;web&quot; middleware group. Now create something great!<br>|<br>*/<br><br>Route::get(&#39;/&#39;, function () {<br>    return view(&#39;welcome&#39;);<br>});<br><br>Route::get(&#39;/inventories&#39;, [InventoryController::class, &#39;index&#39;])-&gt;name(&#39;inventories.index&#39;);<br>Route::get(&#39;/inventories/create&#39;, [InventoryController::class, &#39;create&#39;])-&gt;name(&#39;inventories.create&#39;);<br>Route::post(&#39;/inventories&#39;, [InventoryController::class, &#39;store&#39;])-&gt;name(&#39;inventories.store&#39;);<br>Route::get(&#39;/inventories/{inventory}&#39;, [InventoryController::class, &#39;show&#39;])-&gt;name(&#39;inventories.show&#39;);<br>Route::get(&#39;/inventories/{inventory}/edit&#39;, [InventoryController::class, &#39;edit&#39;])-&gt;name(&#39;inventories.edit&#39;);<br>Route::patch(&#39;/inventories/{inventory}&#39;, [InventoryController::class, &#39;update&#39;])-&gt;name(&#39;inventories.update&#39;);<br>Route::delete(&#39;/inventories/{inventory}&#39;, [InventoryController::class, &#39;destroy&#39;])-&gt;name(&#39;inventories.destroy&#39;);</pre><p>Here’s a sample of what the result of the CRUD operations in our Laravel Inventory Management application could look like:</p><p>Index page (lists all inventory items)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lJA95P6qfgiKE9GsFBH_cQ.png" /><figcaption>Lists page Inventory</figcaption></figure><p>Create page (form for creating a new inventory item)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gSyMs40r9tCJ1jOA9r00Qg.png" /><figcaption>Create page Inventory</figcaption></figure><p>Edit page (form for editing an existing inventory item)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFtol9KJ8achgOH0ue0dLQ.png" /><figcaption>Edit page Inventory</figcaption></figure><p>Show page (form for editing an existing inventory item)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vCRTjiSRlNToBUPK_71cw.png" /><figcaption>Show page Inventory by Id</figcaption></figure><p>Delete page (form for editing an existing inventory item)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Y-J8ghMlC5STsaS-HxsDQ.png" /><figcaption>Confirmation box when delete</figcaption></figure><p>It’s important to note that these images are just a sample representation and may look different depending on the customization done on the HTML and CSS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59071ac0b6f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>