<?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>Laravel &#8211; The Eternal Path</title>
	<atom:link href="https://arasan.de/tag/laravel/feed/" rel="self" type="application/rss+xml" />
	<link>https://arasan.de</link>
	<description>Arasan.de</description>
	<lastBuildDate>Tue, 13 Sep 2022 10:12:59 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://arasan.de/wp-content/uploads/2024/10/triquetra-512x512-1.png</url>
	<title>Laravel &#8211; The Eternal Path</title>
	<link>https://arasan.de</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Laravel &#8211; Eintrag mit Eloquent aus Datenbank löschen</title>
		<link>https://arasan.de/laravel-eintrag-mit-eloquent-aus-datenbank-loeschen/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Tue, 13 Sep 2022 10:12:59 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Eloquent]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[Tabelle]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=518</guid>

					<description><![CDATA[Mit der &#8222;destroy()&#8220; Methode lässt sich mit Eloquent ein Eintrag aus der Datenbank-Tabelle löschen:]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Mit der &#8222;destroy()&#8220; Methode lässt sich mit Eloquent ein Eintrag aus der Datenbank-Tabelle löschen:</p>



<pre class="wp-block-code"><code>&lt;?php

namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Http\Request;
use App\Models\Website;

class WebsitesController extends Controller
{
    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        // destroy method returns true or false
        $websiteSuccessfullyDestroyed = Website::destroy($id);

        if($websiteSuccessfullyDestroyed) {
                return redirect()->route('websites.index')->with('success', 'Website successfully deleted!');
        } else {
                return redirect()->route('websites.index')->with('error', 'Website could not be deleted!');
        }
    }
}</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</title>
		<link>https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Sun, 11 Sep 2022 15:40:26 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[Tabelle]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=500</guid>

					<description><![CDATA[In diesem Schritt erweitern wir unseren Quelltext so, dass nur eigene Todo ListItems angezeigt und bearbeitet werden können.Dazu erstellen wir zuerst eine Migration für die ListItem-Tabelle &#8211; hier erweitern wir die Spalte &#8222;user_id&#8220;.In dieser Spalte wird unsere aktuelle UserId gesichert, wenn ein Todo ListItem angelegt wird. Nach Anlegen der Migration lassen wir diesen Code laufen&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li>Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</li></ol>



<p class="wp-block-paragraph">In diesem Schritt erweitern wir unseren Quelltext so, dass nur eigene Todo ListItems angezeigt und bearbeitet werden können.<br>Dazu erstellen wir zuerst eine Migration für die ListItem-Tabelle &#8211; hier erweitern wir die Spalte &#8222;user_id&#8220;.<br>In dieser Spalte wird unsere aktuelle UserId gesichert, wenn ein Todo ListItem angelegt wird.</p>



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



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1816" height="316" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-migration-add-listitems-user_id.png" alt="" class="wp-image-502"/></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="2704" height="1632" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-migration-schema-up-down.png" alt="" class="wp-image-506"/></figure>



<p class="wp-block-paragraph">Nach Anlegen der Migration lassen wir diesen Code laufen mit:</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1820" height="344" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-migrate.png" alt="" class="wp-image-503"/></figure>



<p class="wp-block-paragraph">Nach Hinzufügen der neuen Tabellenspalte sieht die Tabelle &#8222;list_items&#8220; wie folgt aus (user_id ist bereits bei einigen list_items von Hand geändert worden):</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1954" height="554" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-tabelle-list_items-tableplus.png" alt="" class="wp-image-504"/></figure>



<p class="wp-block-paragraph">Damit nur die ListItems angezeigt werden, die dem aktuellen User gehören, müssen wir das User Model, das ListItem Model und den TodoListController anpassen:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2714" height="1630" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-model-listitem-belongsto-user.png" alt="" class="wp-image-508"/></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2712" height="1634" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-model-user-hasmany-listitems.png" alt="" class="wp-image-509"/></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2706" height="1636" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-todolistcontroller-index-listitems-von-aktuellem-user.png" alt="" class="wp-image-510"/></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2708" height="1628" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-listitem-nur-fuer-aktuellen-user-todolistcontroller-saveItem-mit-aktuellem-user.png" alt="" class="wp-image-511"/></figure>



<p class="wp-block-paragraph">Jetzt werden nur die Todo ListItems von dem aktuell angemeldeten User angezeigt. Wenn ein neues Todo ListItem erzeugt wird, wird automatisch die aktuelle UserId gesetzt.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</title>
		<link>https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Sun, 11 Sep 2022 14:39:44 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Auth]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=496</guid>

					<description><![CDATA[Die Todos sollen nur erstellt und als erledigt markiert werden können, wenn der User angemeldet ist.Dazu schalten wir die &#8222;$this->middleware(&#8218;auth&#8216;);&#8220; im Konstruktor des TodoListControllers aktiv: In der Todos View erscheint beim Zugriff auf die &#8222;todos&#8220; der Login-Dialog, wenn der Benutzer nicht angemeldet ist: Nach erfolgreichem Login kann der User die todos bearbeiten!]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li>Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">Die Todos sollen nur erstellt und als erledigt markiert werden können, wenn der User angemeldet ist.<br>Dazu schalten wir die &#8222;$this->middleware(&#8218;auth&#8216;);&#8220; im Konstruktor des TodoListControllers aktiv:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2718" height="1628" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoApp-todo-nur-eintragen-wenn-user-angemeldet.png" alt="" class="wp-image-497"/></figure>



<p class="wp-block-paragraph">In der Todos View erscheint beim Zugriff auf die &#8222;todos&#8220; der Login-Dialog, wenn der Benutzer nicht angemeldet ist:</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoApp-todos-view-mit-login-dialog-wenn-user-abgemeldet.png" alt="" class="wp-image-498" width="386" height="321"/></figure>



<p class="wp-block-paragraph">Nach erfolgreichem Login kann der User die todos bearbeiten!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</title>
		<link>https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Sun, 11 Sep 2022 14:24:58 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Blade Templates]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=492</guid>

					<description><![CDATA[In diesem Schritt benennen wir das &#8222;Welcome&#8220; Blade-Template um in &#8222;Todos&#8220;.Dazu passen wir neben dem Namen des Blade Templates selbst auch den TodoController an und ersetzen dort &#8222;welcome&#8220; durch &#8222;todos&#8220;:]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li>Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">In diesem Schritt benennen wir das &#8222;Welcome&#8220; Blade-Template um in &#8222;Todos&#8220;.<br>Dazu passen wir neben dem Namen des Blade Templates selbst auch den TodoController an und ersetzen dort &#8222;welcome&#8220; durch &#8222;todos&#8220;:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2718" height="1640" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-rename-welcome-blade-template-to-todos-blade-template.png" alt="" class="wp-image-493"/></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Bootstrap hinzufügen</title>
		<link>https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Sat, 10 Sep 2022 20:11:36 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=435</guid>

					<description><![CDATA[In diesem Schritt fügen wir Twitter Bootstrap zu unserem Projekt hinzu. Das erleichtert das Layout der App wesentlich.Außerdem lassen wir uns Registrierung + Login Masken automatisch erzeugen.Beim letzten Mal haben wir auch ein Layout angelegt, bei der Installation von Bootstrap wird ein separates Layout angelegt. Zuerst installieren wir Laravel-UI mithilfe von composer in der Kommandozeile:&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li>Laravel TodoApp &#8211; Bootstrap hinzufügen</li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">In diesem Schritt fügen wir <a href="https://getbootstrap.com">Twitter Bootstrap</a> zu unserem Projekt hinzu. Das erleichtert das Layout der App wesentlich.<br>Außerdem lassen wir uns Registrierung + Login Masken automatisch erzeugen.<br>Beim letzten Mal haben wir auch ein Layout angelegt, bei der Installation von Bootstrap wird ein separates Layout angelegt.</p>



<p class="wp-block-paragraph">Zuerst installieren wir Laravel-UI mithilfe von composer in der Kommandozeile:</p>



<pre class="wp-block-code"><code>composer require laravel/ui</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1828" height="1364" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-composer-require-laravel-ui.png" alt="" class="wp-image-436"/></figure>



<p class="wp-block-paragraph">Danach installieren wir Bootstrap:</p>



<pre class="wp-block-code"><code>php artisan ui bootstrap --auth</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1816" height="426" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ui-bootstrap-auth-scaffolding.png" alt="" class="wp-image-437"/></figure>



<p class="wp-block-paragraph">Nach Abschluss der Installation von Bootstrap lassen wir einmal die Installation von Node Package Manager laufen:</p>



<pre class="wp-block-code"><code>npm install &amp;&amp; npm run dev</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1820" height="450" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ui-bootstrap-npm-run-dev-vite.png" alt="" class="wp-image-439"/></figure>



<p class="wp-block-paragraph">In unserer Todo-App sind eine Menge neuer Dateien erzeugt worden:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2822" height="1802" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-editor-neue-dateien.png" alt="" class="wp-image-440"/></figure>



<p class="wp-block-paragraph">Folgende Änderungen befinden sich jetzt in unserer App:</p>



<ul class="wp-block-list"><li>Neuer HomeController in App\Http\Controllers</li><li>Neuer ConfirmPasswordController in App\Http\Controllers\Auth</li><li>Neuer ForgotPasswordController in App\Http\Controllers\Auth</li><li>Neuer LoginController in App\Http\Controllers\Auth</li><li>Neuer RegisterController in App\Http\Controllers\Auth</li><li>Neuer ResetPasswordController in App\Http\Controllers\Auth</li><li>Neuer VerificationController in App\Http\Controllers\Auth</li><li>Anpassung von bootstrap.js in resources/js</li><li>Neues Verzeichnis sass in resources</li><li>Neues Layout app.blade.php in resources/views/layouts</li><li>Neue View confirm.blade.php in resources/views/auth/passwords</li><li>Neue View email.blade.php in resources/views/auth/passwords</li><li>Neue View reset.blade.php in resources/views/auth/passwords</li><li>Neue View login.blade.php in resources/views/auth</li><li>Neue View register.blade.php in resources/views/auth</li><li>Neue View verify.blade.php in resources/views/auth</li><li>Neue View home.blade.php in resources/views</li><li>Anpassung von web.php in routes</li></ul>



<p class="wp-block-paragraph">Das sind die wichtigsten Neuerungen, eine Menge Neuerungen. Wir gehen diese Anpassungen einmal durch.</p>



<p class="wp-block-paragraph">Zuerst haben wir die Route &#8222;/register&#8220;, unter der ein neues Registrierungsformular vorhanden ist.<br>Das Formular ist bereits mit Bootstrap gestylt und hat eine Navbar mit den Navigationsrouten <strong>&#8222;/&#8220;</strong>, <strong>&#8222;/register&#8220;</strong> und <strong>&#8222;/login&#8220;</strong>.<br>Wir können einen Namen, eine E-Mail-Adresse und Passwort eingeben und werden nach erfolgreicher Registrierung zum Dashboard weitergeleitet.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2230" height="974" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-auth-register.png" alt="" class="wp-image-443"/></figure>



<p class="wp-block-paragraph">Wir haben sogar bereits Fehlermeldungen, falls bestimmte Eingabefelder (wie z.B. das Passwortfeld) nicht ausgefüllt werden!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2228" height="1078" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-auth-register-fehlermeldung.png" alt="" class="wp-image-445"/></figure>



<p class="wp-block-paragraph">Bei erfolgreicher Registrierung leitet das Formular den Benutzer automatisch zur Dashboard-Route!</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2210" height="528" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-auth-logged-in-dashboard.png" alt="" class="wp-image-447"/></figure>



<p class="wp-block-paragraph">Der Logout leitet automatisch zu Startseite weiter.</p>



<p class="wp-block-paragraph">Das automatisch erzeugte Bootstrap Layout passt farblich nicht zu unserem bisherigen Layout, die Farben sind hell.<br>Deshalb entfernen wir im nächsten Schritt unser Layout und verwenden das bereits erzeugte Bootstrap Layout.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2814" height="1818" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-root-todolist-items-card-1.png" alt="" class="wp-image-449"/><figcaption>Verwendung von neuem Bootstrap Layout und der &#8222;card&#8220; Klasse</figcaption></figure>



<p class="wp-block-paragraph">Das sieht dann im Browser folgendermaßen aus:</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-root-todolist-items-browser-2.png" alt="" class="wp-image-450" width="402" height="463"/></figure>



<p class="wp-block-paragraph">Hier sind noch die neuen Auth-Routen sowie die Home-Route:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2818" height="1770" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-root-todolist-items-home-auth-routes.png" alt="" class="wp-image-451"/></figure>



<p class="wp-block-paragraph">Der HTML Code der Homeseite sieht wie folgt aus:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2814" height="1816" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-bootstrap-root-todolist-items-home-browser-1.png" alt="" class="wp-image-452"/></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Layout erstellen</title>
		<link>https://arasan.de/laravel-todoapp-layout-erstellen/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Sat, 10 Sep 2022 17:28:07 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=424</guid>

					<description><![CDATA[Jetzt passen wir unsere Laravel TodoApp an, indem wir ein Layout erstellen, dass für mehrere Seiten die Basis ist.Dazu verschieben wir einige Inhalte (gesamter html-head, html-body) aus der welcome.blade.php in eine neue app-layout.blade.php Datei. Diese Datei erstellen wir in dem neuen resources/layouts Verzeichnis: Die Webseiten-Ansicht hat sich nicht geändert. Der Grund für die Erstellung einer&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li>Laravel TodoApp &#8211; Layout erstellen</li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">Jetzt passen wir unsere Laravel TodoApp an, indem wir ein Layout erstellen, dass für mehrere Seiten die Basis ist.<br>Dazu verschieben wir einige Inhalte (gesamter html-head, html-body) aus der welcome.blade.php in eine neue app-layout.blade.php Datei. Diese Datei erstellen wir in dem neuen resources/layouts Verzeichnis:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2500" height="1672" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-neues-app-layout-yield.png" alt="" class="wp-image-425"/></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2504" height="1814" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-welcome-blade-extends-app-layout-section-content.png" alt="" class="wp-image-426"/></figure>



<p class="wp-block-paragraph">Die Webseiten-Ansicht hat sich nicht geändert. Der Grund für die Erstellung einer globalen Layout-Seite ist das einfache Hinzufügen von neuen Seiten in den nächsten Schritten:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2210" height="982" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-welcome-blade-extends-app-layout-browser.png" alt="" class="wp-image-427"/></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</title>
		<link>https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Fri, 09 Sep 2022 14:39:32 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Blade Templates]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[Tabelle]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=405</guid>

					<description><![CDATA[Nun können wir uns daran machen, unsere neu angelegten Todos als erledigt zu markieren.Dazu brauchen wir pro ListItem einen Button, der das jeweilige als erledigt markiert: Erledigte Todos haben vor dem Eintrag ein &#8222;✓&#8220;, unerledigte werden mit &#8222;o&#8220; dargestellt.Das ganze ist in dem Template der root-Route (&#8222;Welcome.blade.php&#8220;) definiert: Hier haben wir eine if/else Bedingung und&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li>Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">Nun können wir uns daran machen, unsere neu angelegten Todos als erledigt zu markieren.<br>Dazu brauchen wir pro ListItem einen Button, der das jeweilige als erledigt markiert:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2228" height="998" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-mit-complete-button-browser.png" alt="" class="wp-image-406"/></figure>



<p class="wp-block-paragraph">Erledigte Todos haben vor dem Eintrag ein &#8222;✓&#8220;, unerledigte werden mit &#8222;o&#8220; dargestellt.<br>Das ganze ist in dem Template der root-Route (&#8222;Welcome.blade.php&#8220;) definiert:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2512" height="1672" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-mit-complete-button-in-welcome-view.png" alt="" class="wp-image-407"/></figure>



<p class="wp-block-paragraph">Hier haben wir eine if/else Bedingung und ein Formular mit Submit-Button pro ListItem.<br>Dazu wird das Formular bei Klick auf den &#8222;Complete&#8220;-Button an eine neue Route (mit einem Parameter $id) geschickt.<br>Der Parameter ist notwendig, damit wir das richtige ListItem als erledigt markieren.<br>Nun folgt die Erstellung der Route in der Datei web.php:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2506" height="1670" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-listitem-complete-route-erstellen.png" alt="" class="wp-image-408"/></figure>



<p class="wp-block-paragraph">In der Route gibt es eine Neuerung, es wird ein Parameter &#8222;$id&#8220; verwendet &#8211; als gültiger Parameter ist eine Zahl definiert (id ist eine Zahl).<br>Außerdem haben wir die Route benannt, damit wir einfacher darauf zugreifen können. </p>



<p class="wp-block-paragraph">Im TodoListController ergänzen wir die Methode &#8222;markItemAsComplete&#8220;, die diesen Anwendungsfall behandelt. </p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2500" height="1672" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-listitem-complete-methode-in-todolistcontroller-erstellen.png" alt="" class="wp-image-409"/></figure>



<p class="wp-block-paragraph">Als weitere Optimierung können wir den &#8222;Complete&#8220;-Button nur dann anzeigen, wenn der Todo Eintrag noch nicht abgeschlossen ist:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2514" height="1666" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-mit-complete-button-in-welcome-view-nur-wenn-nicht-complete.png" alt="" class="wp-image-410"/></figure>



<p class="wp-block-paragraph">Zu guter Letzt können wir die Farben anpassen:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2514" height="1668" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-mit-complete-button-angepasste-farben-in-welcome-view.png" alt="" class="wp-image-411"/></figure>



<p class="wp-block-paragraph">Unser Ergebnis kann sich sehen lassen:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2214" height="960" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-mit-complete-button-angepasste-farben-browser.png" alt="" class="wp-image-412"/></figure>



<p class="wp-block-paragraph">Nun checken wir die Änderungen ein und aktualisieren unser Github Repository mit dem folgenden Befehl:</p>



<pre class="wp-block-code"><code>git push origin master</code></pre>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1824" height="556" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-git-push-origin-master.png" alt="" class="wp-image-422"/></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</title>
		<link>https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Fri, 09 Sep 2022 09:14:03 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Tabelle]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=391</guid>

					<description><![CDATA[Nachdem wir das Speichern von ListItems in der Tabelle &#8222;list_items&#8220; gelöst haben, machen wir uns nun daran, alle ListItems aus der Tabelle in der Default View &#8222;welcome.blade.php&#8220; auszugeben. Dazu passen wir die Welcome Route an: Außerdem brauchen wir eine &#8222;index()&#8220; Methode in unserem TodoListController. In der Methode wird wie bisher die &#8222;Welcome&#8220;-View (das Blade Template)&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li>Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">Nachdem wir das Speichern von ListItems in der Tabelle &#8222;list_items&#8220; gelöst haben, machen wir uns nun daran, alle ListItems aus der Tabelle in der Default View &#8222;welcome.blade.php&#8220; auszugeben. Dazu passen wir die Welcome Route an:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3004" height="1678" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-root-route-fuer-ausgabe-von-listitems-anpassen.png" alt="" class="wp-image-393"/></figure>



<p class="wp-block-paragraph">Außerdem brauchen wir eine &#8222;index()&#8220; Methode in unserem TodoListController. In der Methode wird wie bisher die &#8222;Welcome&#8220;-View (das Blade Template) zurückgegeben. Vorher holen wir uns über &#8222;ListItem::all()&#8220; alle ListItems über das Model aus der Tabelle &#8222;list_items&#8220; und übergeben diese Liste mit an die View:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2996" height="1672" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-index-methode-in-todolistcontroller-fuer-ausgabe-von-listitems-in-view.png" alt="" class="wp-image-394"/></figure>



<p class="wp-block-paragraph">In der &#8222;Welcome&#8220;-View können wir diese Variable &#8222;$listItems&#8220; jetzt verwenden &#8211; wir geben den Inhalt mithilfe einer Debug-Ausgabe in der View direkt aus:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2998" height="1670" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-debug-ausgabe-von-listitems-in-view.png" alt="" class="wp-image-395"/></figure>



<p class="wp-block-paragraph">Das ganze sieht dann im Browser folgendermaßen aus:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2250" height="1384" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-debug-ausgabe-von-listitems-browser.png" alt="" class="wp-image-396"/></figure>



<p class="wp-block-paragraph">Jetzt tauschen wir die Debug Ausgabe durch eine for-Schleife aus, mit deren Hilfe wir alle Elemente in einer unsortierten Liste ausgeben:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3002" height="1678" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-in-welcome-view.png" alt="" class="wp-image-399"/></figure>



<p class="wp-block-paragraph">Hier ist die Ausgabe der Welcome-View mit ListItems im Browser:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2230" height="812" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-ausgabe-von-listitems-browser.png" alt="" class="wp-image-398"/></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</title>
		<link>https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Fri, 09 Sep 2022 07:49:58 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[Tabelle]]></category>
		<category><![CDATA[TablePlus]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=383</guid>

					<description><![CDATA[Jetzt können wir die eingegebenen Formulardaten, die per POST Request an unseren TodoListController übertragen werden, in der Tabelle &#8222;list_items&#8220; speichern. Dazu erweitern wir unseren Quelltext wie folgt: Wir prüfen vor dem Speichern der Todo-Items, ob überhaupt Formulardaten ausgefüllt wurden.Nun geben wir im Formular ein neues Todo-Item ein: Nach einem Klick auf Speichern schauen wir uns&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/">Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</a></li><li>Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">Jetzt können wir die eingegebenen Formulardaten, die per POST Request an unseren TodoListController übertragen werden, in der Tabelle &#8222;list_items&#8220; speichern. Dazu erweitern wir unseren Quelltext wie folgt:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3000" height="1672" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-neues-list-item-request-mit-model-in-tabelle-list_items-speichern.png" alt="" class="wp-image-384"/></figure>



<p class="wp-block-paragraph">Wir prüfen vor dem Speichern der Todo-Items, ob überhaupt Formulardaten ausgefüllt wurden.<br>Nun geben wir im Formular ein neues Todo-Item ein:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2228" height="518" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-neues-list-item-request-ueber-formular-browser.png" alt="" class="wp-image-385"/></figure>



<p class="wp-block-paragraph">Nach einem Klick auf Speichern schauen wir uns die Tabelle &#8222;list_items&#8220; in TablePlus an und sehen unseren neuen Eintrag:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2042" height="608" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-neues-list-item-in-tabelle-list_items-ansehen-tableplus.png" alt="" class="wp-image-388"/></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</title>
		<link>https://arasan.de/laravel-todoapp-formulardaten-in-logdatei-ausgeben/</link>
		
		<dc:creator><![CDATA[«Æ»]]></dc:creator>
		<pubDate>Fri, 09 Sep 2022 07:19:25 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[Request]]></category>
		<category><![CDATA[TodoApp]]></category>
		<guid isPermaLink="false">https://arasan.de/?p=368</guid>

					<description><![CDATA[In diesem Schritt geben wir die Formulardaten aus, die beim Senden (Klick auf den &#8222;Save&#8220;-Button) übertragen werden.Wir haben die neue Route zum Übertragen des POST-Requests bereits im letzten Schritt angelegt, die Methode &#8222;saveItem()&#8220; im TodoListController passen wir jetzt an: Wir haben den Parameter &#8222;$request&#8220; ergänzt und geben die Request-Daten, die vom Formular übertragen werden, in&#8230;]]></description>
										<content:encoded><![CDATA[<ol style="margin: 20px"><li><a href="https://arasan.de/laravel-projekt-mit-git-github-erstellen/">Laravel TodoApp &#8211; Projekt mit Git + Github erstellen</a></li><li><a href="https://arasan.de/laravel-view-blade-template-in-atom-editor-bearbeiten/">Laravel TodoApp &#8211; View (Blade Template) in Atom Editor bearbeiten:</a></li><li><a href="https://arasan.de/laravel-mysql-datenbank-verbindung-konfigurieren/">Laravel TodoApp &#8211; MySQL Datenbank-Verbindung konfigurieren</a></li><li><a href="https://arasan.de/laravel-todoapp-model-migration-erstellen/">Laravel TodoApp &#8211; Model + Migration erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-listitem-form-route-controller-erstellen/">Laravel TodoApp &#8211; ListItem Form + Route + Controller erstellen</a></li><li>Laravel TodoApp &#8211; Formulardaten in Logdatei ausgeben</li><li><a href="https://arasan.de/laravel-todoapp-formulardaten-in-tabelle-speichern/">Laravel TodoApp &#8211; Formulardaten in Tabelle speichern</a></li><li><a href="https://arasan.de/laravel-todoapp-listitems-aus-tabelle-ausgeben/">Laravel TodoApp &#8211; ListItems aus Tabelle ausgeben</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-listitem-als-erledigt-markieren/">Laravel TodoApp &#8211; Todo ListItem als erledigt markieren</a></li><li><a href="https://arasan.de/laravel-todoapp-layout-erstellen/">Laravel TodoApp &#8211; Layout erstellen</a></li><li><a href="https://arasan.de/laravel-todoapp-bootstrap-hinzufuegen/">Laravel TodoApp &#8211; Bootstrap hinzufügen</a></li><li><a href="https://arasan.de/laravel-todoapp-welcome-blade-template-umbenennen-in-todos/">Laravel TodoApp &#8211; Welcome Blade Template umbenennen in Todos</a></li><li><a href="https://arasan.de/laravel-todoapp-todo-nur-eintragen-wenn-user-angemeldet/">Laravel TodoApp &#8211; Todo nur eintragen wenn User angemeldet</a></li><li><a href="https://arasan.de/laravel-todoapp-nur-eigene-todos-anzeigen-und-bearbeiten/">Laravel TodoApp &#8211; Nur eigene Todos anzeigen und bearbeiten</a></li></ol>



<p class="wp-block-paragraph">In diesem Schritt geben wir die Formulardaten aus, die beim Senden (Klick auf den &#8222;Save&#8220;-Button) übertragen werden.<br>Wir haben die neue Route zum Übertragen des POST-Requests bereits im letzten Schritt angelegt, die Methode &#8222;saveItem()&#8220; im TodoListController passen wir jetzt an:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2998" height="1664" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-log-request.png" alt="" class="wp-image-369"/></figure>



<p class="wp-block-paragraph">Wir haben den Parameter &#8222;$request&#8220; ergänzt und geben die Request-Daten, die vom Formular übertragen werden, in einer Logdatei aus.<br>Wenn wir Daten in unser Eingabefeld eingeben und das Formular abschicken, sieht die Logdatei folgendermaßen aus:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2220" height="578" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-listitem-neues-todo-item-browser.png" alt="" class="wp-image-370"/></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3004" height="1672" src="https://arasan.de/wp-content/uploads/2022/09/laravel-todoapp-form-neues-list-item-request-in-laravel-log.png" alt="" class="wp-image-372"/></figure>



<p class="wp-block-paragraph">Damit haben wir den Aufbau des Requests und können diese Daten im nächsten Schritt in unserer Tabelle &#8222;list_items&#8220; speichern.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
