<?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>Eloquent &#8211; The Eternal Path</title>
	<atom:link href="https://arasan.de/tag/eloquent/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>Eloquent &#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>
	</channel>
</rss>
