<?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 pritam maheshwari on Medium]]></title>
        <description><![CDATA[Stories by pritam maheshwari on Medium]]></description>
        <link>https://medium.com/@pritammaheshwari188?source=rss-9268921af7bd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*yz21zxsutTwxl3ul</url>
            <title>Stories by pritam maheshwari on Medium</title>
            <link>https://medium.com/@pritammaheshwari188?source=rss-9268921af7bd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:41:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pritammaheshwari188/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 Oauth 2]]></title>
            <link>https://medium.com/@pritammaheshwari188/laravel-oauth-2-205344138a26?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/205344138a26</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[laravel-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 04:30:56 GMT</pubDate>
            <atom:updated>2025-02-13T04:30:59.590Z</atom:updated>
            <content:encoded><![CDATA[<p>Laravel Oauth 2</p><p>https://fish-equipment-7c7.notion.site/Laravel-Oauth-2-1995f898d64880b2b626cd48cfe2563d</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=205344138a26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In Laravel’s Eloquent and Query Builder, use where and orWhere. Here's how they work:]]></title>
            <link>https://medium.com/@pritammaheshwari188/in-laravels-eloquent-and-query-builder-use-where-and-orwhere-heres-how-they-work-38ea33ae3a15?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/38ea33ae3a15</guid>
            <category><![CDATA[query-builder]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[laravel-development]]></category>
            <category><![CDATA[php-development]]></category>
            <category><![CDATA[query]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Thu, 26 Sep 2024 19:26:27 GMT</pubDate>
            <atom:updated>2024-09-26T19:26:27.695Z</atom:updated>
            <content:encoded><![CDATA[<p>In Laravel’s Eloquent and Query Builder, you can use where and orWhere to filter your query results based on specific conditions. Here&#39;s how they work:</p><h3>1. where():</h3><p>The where method adds a condition to the query. It works similarly to the SQL WHERE clause, meaning that only the records matching the condition will be returned.</p><h3>2. orWhere():</h3><p>The orWhere method is used when you want to add an alternative condition. It works like the SQL OR clause, meaning that if the previous condition is false, it will check the orWhere condition.</p><h3>Basic Syntax:</h3><pre>$query-&gt;where(&#39;column&#39;, &#39;operator&#39;, &#39;value&#39;)<br>      -&gt;orWhere(&#39;column&#39;, &#39;operator&#39;, &#39;value&#39;)<br>      -&gt;get();</pre><h3>Example 1: Using where</h3><p>If you want to get all users with the email set to &quot;john@mail.com&quot;:</p><pre>$users = User::where(&#39;email&#39;, &#39;=&#39;, &#39;john@mail.com&#39;)-&gt;get()</pre><p>This will return only users with an email of &quot;john@mail.com&quot;.</p><h3>Example 2: Using orWhere</h3><p>If you want to get users where the email is &quot;john@mail.com&quot; <strong>or</strong> the name is &quot;John&quot;</p><pre>$users = User::where(&#39;email&#39;, &#39;john@mail.com&#39;)<br>             -&gt;orWhere(&#39;name&#39;, &#39;John&#39;)<br>             -&gt;get();</pre><p>This will return users with an email of &quot;john@mail.com&quot; <strong>or</strong> a name of &quot;John&quot;. In SQL terms, this would be:</p><pre>SELECT * FROM users WHERE email = &#39;john@mail.com&#39; OR name = &#39;John&#39;;</pre><h3>Example 3: Combining Multiple where and orWhere</h3><p>You can combine multiple where and orWhere conditions to create more complex queries.</p><h4>Example</h4><p>You want to get users where the email is &quot;john@mail.com&quot; <strong>and</strong> the age is greater than 25, <strong>or</strong> the name is &quot;Jane&quot;</p><pre>$users = User::where(&#39;email&#39;, &#39;john@mail.com&#39;)<br>             -&gt;where(&#39;age&#39;, &#39;&gt;&#39;, 25)<br>             -&gt;orWhere(&#39;name&#39;, &#39;Jane&#39;)<br>             -&gt;get();</pre><p>This translates to:</p><pre>SELECT * FROM users WHERE (email = &#39;john@mail.com&#39; AND age &gt; 25) OR name = &#39;Jane&#39;;</pre><h3>Grouping Conditions:</h3><p>To group conditions together (e.g., combining multiple where conditions with orWhere), you can use a closure to isolate some conditions, like this:</p><h4>Example:</h4><p>You want users whose email is &quot;john@mail.com&quot; and are either older than 25 <strong>or</strong> their name is &quot;Jane&quot;:</p><pre>$users = User::where(&#39;email&#39;, &#39;john@mail.com&#39;)<br>             -&gt;where(function($query) {<br>                 $query-&gt;where(&#39;age&#39;, &#39;&gt;&#39;, 25)<br>                       -&gt;orWhere(&#39;name&#39;, &#39;Jane&#39;);<br>             })<br>             -&gt;get()</pre><p>This translates to:</p><pre>SELECT * FROM users WHERE email = &#39;john@mail.com&#39; AND (age &gt; 25 OR name = &#39;Jane&#39;);</pre><h3>Explanation:</h3><ul><li><strong>where(‘email’, ‘john@mail.com’)</strong>: First condition.</li><li><strong>where(function($query) { … })</strong>: Grouping conditions together inside the closure.</li><li><strong>orWhere(‘name’, ‘Jane’)</strong>: This condition will be evaluated if the first grouped condition (age &gt; 25) is false.</li></ul><h3>Conclusion:</h3><ul><li>Use where() to apply simple conditions.</li><li>Use orWhere() to add alternative conditions.</li><li>Use closures to group conditions and apply more complex logic.</li></ul><p>4o</p><p>You said:</p><p>$users = User::where(‘email’, ‘john@mail.com’) -&gt;where(‘age’, ‘&gt;’, 25) -&gt;orWhere(‘name’, ‘Jane’) -&gt;get(); IWANT TO KNOW IF EMAIL JOHN@MAIL.COM NOT FOUND IN DB THEN DOES IT WILL RETURN</p><p>In the query you’ve provided, if no user with the email john@mail.com is found in the database, it will still return users whose name is Jane due to the way the orWhere condition is structured.</p><h3>Breakdown of the Query:</h3><pre>$users = User::where(&#39;email&#39;, &#39;john@mail.com&#39;)<br>             -&gt;where(&#39;age&#39;, &#39;&gt;&#39;, 25)<br>             -&gt;orWhere(&#39;name&#39;, &#39;Jane&#39;)<br>             -&gt;get();</pre><h3>How It Works:</h3><ol><li><strong>where(&#39;email&#39;, &#39;john@mail.com&#39;)</strong>: This filters for users with the email john@mail.com.</li><li><strong>where(&#39;age&#39;, &#39;&gt;&#39;, 25)</strong>: This adds another condition that the age must be greater than 25 <strong>but only if the first condition (email) is met</strong>.</li><li><strong>orWhere(&#39;name&#39;, &#39;Jane&#39;)</strong>: This adds an alternative condition. This means that even if the first two conditions fail (i.e., no user has the specified email), it will return users whose name is Jane.</li></ol><h3>Scenarios:</h3><ol><li><strong>If a user with the email </strong><strong>john@mail.com exists and has an age greater than 25</strong>:</li></ol><ul><li>The user will be returned.</li></ul><ol><li><strong>If a user with the email </strong><strong>john@mail.com exists but has an age of 25 or less</strong>:</li></ol><ul><li>That user will <strong>not</strong> be returned because the second condition (age &gt; 25) is not met.</li></ul><ol><li><strong>If no users have the email </strong><strong>john@mail.com</strong>:</li></ol><ul><li>The query will then check for users with the name Jane.</li><li>If at least one user named Jane exists, that user will be returned.</li><li>If no users named Jane exist either, then the result will be an empty collection.</li></ul><h3>Summary:</h3><p>So to directly answer your question: <strong>Yes</strong>, if no user with the email john@mail.com is found, the query will still return users whose name is Jane, if they exist in the database. If neither condition is met, it will return an empty collection.</p><p>IF ANY INQUERY -<a href="https://www.linkedin.com/in/pritam-maheshwari-335660176/">https://www.linkedin.com/in/pritam-maheshwari-335660176/</a></p><p>EMAIL- pritammaheshwari188@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38ea33ae3a15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering SQL Joins in Laravel: A Complete Guide to Inner, Outer, Left, and Right Join]]></title>
            <link>https://medium.com/@pritammaheshwari188/mastering-sql-joins-in-laravel-a-complete-guide-to-inner-outer-left-and-right-join-3dbb414d2a30?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dbb414d2a30</guid>
            <category><![CDATA[joins-in-sql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[laravel-development]]></category>
            <category><![CDATA[php-development]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Thu, 26 Sep 2024 19:02:26 GMT</pubDate>
            <atom:updated>2024-09-26T19:02:26.173Z</atom:updated>
            <content:encoded><![CDATA[<p>The query you provided is using <strong>Query Builder</strong> in Laravel. Specifically, it is not using Eloquent, but rather the DB facade for building raw SQL queries. The syntax you used is for <strong>Laravel&#39;s Query Builder</strong>, which allows you to build database queries programmatically.</p><p>In contrast, <strong>Eloquent</strong> is Laravel’s ORM (Object-Relational Mapping) that provides a more object-oriented approach to interacting with the database, where you work with models that represent your database tables.</p><h3>Key Differences:</h3><p><strong>Query Builder</strong>: Used for creating SQL queries programmatically (as in your example).</p><pre>$users = DB::table(&#39;users&#39;)<br>            -&gt;select(&#39;name&#39;, &#39;email as user_email&#39;)<br>            -&gt;get();</pre><p><strong>Eloquent</strong>: Uses model classes to interact with the database.</p><pre>$users = User::select(&#39;name&#39;, &#39;email as user_email&#39;)-&gt;get();</pre><p>Join using Eloquent</p><p>To write a join using Laravel&#39;s Eloquent ORM, you can use the join method directly within your query. Here’s an example of how you can perform a join using Eloquent:</p><h3>Example:</h3><p>Assume you have two tables, users and posts, and you want to join them based on the users.id and posts.user_id.</p><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email as user_email&#39;, &#39;posts.title&#39;)<br>             -&gt;join(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><h3>Explanation:</h3><ul><li>User::select(...): We&#39;re selecting the name and email fields from the users table and renaming email to user_email.</li><li>join(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;): This performs an inner join between the users table and the posts table, joining where users.id matches posts.user_id.</li><li>-&gt;get(): Fetches the result as a collection.</li></ul><p>You can also perform other types of joins like leftJoin or rightJoin by replacing join with the corresponding method:</p><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email as user_email&#39;, &#39;posts.title&#39;)<br>             -&gt;leftJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><p>This query will return all users and the posts.title for those who have corresponding posts, including users with no posts when using leftJoin.</p><p>ure! Let’s break down what data the query will return.</p><h3>Tables:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*B_1-TsKGZKU4ISyRmrkojA.png" /></figure><h3>Query:code</h3><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email as user_email&#39;, &#39;posts.title&#39;)<br>             -&gt;join(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><h3>Result:</h3><p>This query will return the list of users with their name, email (renamed as user_email), and the corresponding title of the post.</p><p>Here’s how the data will be returned:</p><h4>Query Output:od</h4><pre>[<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;user_email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;First Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;user_email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Jane&quot;,<br>        &quot;user_email&quot;: &quot;jane@mail.com&quot;,<br>        &quot;title&quot;: &quot;Yet Another Post&quot;<br>    }<br>]</pre><h3>Explanation:</h3><ul><li><strong>John</strong> has two posts, so he appears twice, once for each post.</li><li><strong>Jane</strong> has one post, so she appears once.</li><li><strong>Alice</strong> has no posts, so she is not included in the result (since we are using an inner join).</li></ul><p>If you want to include users even if they don’t have any posts, you would use a leftJoin</p><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email as user_email&#39;, &#39;posts.title&#39;)<br>             -&gt;leftJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><h4>Result for leftJoin:</h4><pre>[<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;user_email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;First Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;user_email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Jane&quot;,<br>        &quot;user_email&quot;: &quot;jane@mail.com&quot;,<br>        &quot;title&quot;: &quot;Yet Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Alice&quot;,<br>        &quot;user_email&quot;: &quot;alice@mail.com&quot;,<br>        &quot;title&quot;: null<br>    }<br>]</pre><p>Here, <strong>Alice</strong> is included with null as the title because she doesn&#39;t have any posts.</p><p>4o</p><p>You said:</p><p>an exaple of right join</p><p>In Laravel’s Eloquent ORM, the equivalent of an SQL RIGHT JOIN can be performed using the rightJoin() method. A RIGHT JOIN returns all records from the right table (the joined table), and the matched records from the left table. If no match is found, null values are returned for the columns from the left table.</p><h3>Example:</h3><p>Let’s use the same tables: users and posts.</p><h3>Tables:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*uQsTqG6Wdy2JHpGlfV_QQQ.png" /></figure><h3>RIGHT JOIN Query:</h3><p>In this case, the posts table is the &quot;right&quot; table, and we want all the posts to be included, even if they don&#39;t have a corresponding user.</p><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email as user_email&#39;, &#39;posts.title&#39;)<br>             -&gt;rightJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><h3>Expected Output:</h3><p>In this case, all records from the posts table will be returned, even if there is no matching user in the users table. The users.name and users.email will be null if there’s no corresponding user.</p><h4>Query Output:</h4><pre>[<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;user_email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;First Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;user_email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Jane&quot;,<br>        &quot;user_email&quot;: &quot;jane@mail.com&quot;,<br>        &quot;title&quot;: &quot;Yet Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: null,<br>        &quot;user_email&quot;: null,<br>        &quot;title&quot;: &quot;New Post Without User&quot;<br>    }<br>]</pre><h3>Explanation:</h3><ul><li>The first three records correspond to posts that have users (John and Jane).</li><li>The last record comes from the posts table, which has no matching user (so name and email are null).</li></ul><p>4o</p><p>You said:</p><p>how outer join work</p><p>In SQL, an <strong>outer join</strong> refers to a combination of both a <strong>left join</strong> and a <strong>right join</strong>. There are two types of outer joins:</p><ol><li><strong>LEFT OUTER JOIN</strong>: Returns all records from the left table (even if there are no matches in the right table), and the matched records from the right table. Records from the left table that have no match in the right table will still appear, but with NULL for the columns from the right table.</li><li><strong>RIGHT OUTER JOIN</strong>: Returns all records from the right table (even if there are no matches in the left table), and the matched records from the left table. Records from the right table that have no match in the left table will still appear, but with NULL for the columns from the left table.</li><li><strong>FULL OUTER JOIN</strong> (Not natively supported in Laravel’s Query Builder or Eloquent, but can be simulated): Returns all records when there is a match in either left or right table. Rows with no match in either table will return NULL values for the other table&#39;s columns.</li></ol><h3>1. LEFT OUTER JOIN in Laravel</h3><p>This is commonly known just as leftJoin(). It returns all records from the left table and the matching records from the right table (with NULL for unmatched rows from the right table).</p><h4>Example:</h4><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email&#39;, &#39;posts.title&#39;)<br>             -&gt;leftJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><h3>Result:</h3><p>This query will return all users, including those who don’t have any posts, with NULL for posts.title if no post exists for a user.</p><h4>Output:ode</h4><pre>[<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;First Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Jane&quot;,<br>        &quot;email&quot;: &quot;jane@mail.com&quot;,<br>        &quot;title&quot;: &quot;Yet Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Alice&quot;,<br>        &quot;email&quot;: &quot;alice@mail.com&quot;,<br>        &quot;title&quot;: null<br>    }<br>]</pre><h3>2. RIGHT OUTER JOIN in Laravel</h3><p>This can be done using rightJoin(). It returns all records from the right table and the matching records from the left table (with NULL for unmatched rows from the left table).</p><h4>Example:</h4><pre>$users = User::select(&#39;users.name&#39;, &#39;users.email&#39;, &#39;posts.title&#39;)<br>             -&gt;rightJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;)<br>             -&gt;get();</pre><h3>Result:</h3><p>This query will return all posts, including those without a corresponding user, with NULL for users.name and users.email if no user exists for a post.</p><h4>Output:</h4><pre>[<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;First Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Jane&quot;,<br>        &quot;email&quot;: &quot;jane@mail.com&quot;,<br>        &quot;title&quot;: &quot;Yet Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: null,<br>        &quot;email&quot;: null,<br>        &quot;title&quot;: &quot;New Post Without User&quot;<br>    }<br>]</pre><h3>3. FULL OUTER JOIN (Simulated in Laravel)</h3><p>Laravel doesn’t support FULL OUTER JOIN directly, but you can simulate it using leftJoin and rightJoin combined with union().</p><h4>Example of Simulating FULL OUTER JOIN:</h4><p>To perform a full outer join in Laravel, you can combine a leftJoin and a rightJoin using union():</p><pre>$leftJoin = User::select(&#39;users.name&#39;, &#39;users.email&#39;, &#39;posts.title&#39;)<br>                -&gt;leftJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;);</pre><pre>$rightJoin = User::select(&#39;users.name&#39;, &#39;users.email&#39;, &#39;posts.title&#39;)<br>                 -&gt;rightJoin(&#39;posts&#39;, &#39;users.id&#39;, &#39;=&#39;, &#39;posts.user_id&#39;);</pre><pre>$fullOuterJoin = $leftJoin-&gt;union($rightJoin)-&gt;get();</pre><h3>Result:</h3><p>This query will return all users and all posts, including those that don’t have matches in either table.</p><h4>Output:</h4><pre>[<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;First Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;John&quot;,<br>        &quot;email&quot;: &quot;john@mail.com&quot;,<br>        &quot;title&quot;: &quot;Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Jane&quot;,<br>        &quot;email&quot;: &quot;jane@mail.com&quot;,<br>        &quot;title&quot;: &quot;Yet Another Post&quot;<br>    },<br>    {<br>        &quot;name&quot;: &quot;Alice&quot;,<br>        &quot;email&quot;: &quot;alice@mail.com&quot;,<br>        &quot;title&quot;: null<br>    },<br>    {<br>        &quot;name&quot;: null,<br>        &quot;email&quot;: null,<br>        &quot;title&quot;: &quot;New Post Without User&quot;<br>    }<br>]</pre><h3>Key Takeaways:</h3><ul><li><strong>LEFT JOIN</strong>: Includes all rows from the left table, even if there are no matches in the right table.</li><li><strong>RIGHT JOIN</strong>: Includes all rows from the right table, even if there are no matches in the left table.</li><li><strong>FULL OUTER JOIN</strong>: Includes all rows from both tables, filling unmatched columns with NULL values. Not natively supported but can be simulated with union() in Laravel.</li></ul><p>4o</p><p>You said:</p><p>I am writing a article about this so write a title name for this concept</p><p>Memory updated</p><p>Here are a few title suggestions for your article on SQL joins in Laravel:</p><ol><li><strong>“Mastering SQL Joins in Laravel: A Complete Guide to Inner, Outer, Left, and Right Joins”</strong></li><li><strong>“Understanding SQL Joins in Laravel Eloquent: A Step-by-Step Guide”</strong></li><li><strong>“Laravel Joins Demystified: Inner, Left, Right, and Outer Joins Explained”</strong></li><li><strong>“The Essential Guide to SQL Joins in Laravel: From Left Joins to Full Outer Joins”</strong></li><li><strong>“Unlocking the Power of SQL Joins in Laravel: A Developer’s Handbook”</strong></li></ol><p>contact if an</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dbb414d2a30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Comprehensive Guide to Sending Notifications in Laravel with Firebase Cloud Messaging (FCM)]]></title>
            <link>https://medium.com/@pritammaheshwari188/a-comprehensive-guide-to-sending-notifications-in-laravel-with-firebase-cloud-messaging-fcm-274caf04f8ac?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/274caf04f8ac</guid>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[firebasecloudmessaging]]></category>
            <category><![CDATA[notification-service]]></category>
            <category><![CDATA[push-notification]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 17:56:48 GMT</pubDate>
            <atom:updated>2024-09-23T18:04:58.911Z</atom:updated>
            <content:encoded><![CDATA[<p>Setting Up Your Laravel Project<br>Install Laravel: If you haven’t already, set up a new Laravel project by running:</p><p>composer create-project — prefer-dist laravel/laravel your-project-name<br>Set Up Firebase:</p><p>Go to the Firebase Console.</p><p><a href="https://console.firebase.google.com/?pli=1">https://console.firebase.google.com/?pli=1</a><br>Create a new project or select an existing one.<br>Navigate to the “Cloud Messaging” section and obtain your Server Key and Sender ID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s9lQdXtaxfn9ZSSZw1mTCQ.png" /></figure><p>to impliment firebase notification on mobile app use this approch below.</p><p>github package link =<a href="https://github.com/kreait/firebase-php">https://github.com/kreait/firebase-php</a></p><p>1 Install package = composer require “kreait/firebase-php:⁷.0”<br>2 mobile app developer will give a serverjson — put file in the root or in other folder<br>3 create a function in controller and put below code</p><p>4Controller</p><pre>&lt;?php<br>namespace App\Http\Controllers\api;<br>use App\Http\Controllers\Controller; // Ensure you&#39;re using the correct path<br>use Illuminate\Http\Request;<br>use Kreait\Firebase\Factory;<br>use Kreait\Firebase\Messaging\CloudMessage;<br>use Kreait\Firebase\Messaging\Notification;<br>class FirebaseNotificationController extends Controller<br>{<br> public function sendNotification()<br> {<br> <br> // Device token hard-coded for now<br> $deviceToken =&#39;fvOc0GZUTCGAMhSuJGbnJ5:APA91bHhG6Aa5U9YYJvOb<br>c7h8OOLXp7FNR7XFhLyEq81JeenqSJfEpgdRogwixGhU55JQssjtlepEu6ArO<br>Q1FaBD8E0bR1yqEZH-z1Ab0e_4Sus2u533FPnYbZbBo7p461JHVvvWQkhB&#39;;<br> // Corrected assignment and method chaining<br> //agtech-70c59–0f678ffc20f51111.json  this is the json file name<br>// mobile app developer provide or you can download form the fcm console<br> $firebase_credential = (new Factory)<br> -&gt;withServiceAccount(base_path(&#39;agtech-70c59–0f678ffc20f51111.json&#39;));<br> // Fixed the missing `=` sign<br> $messaging = $firebase_credential-&gt;createMessaging();<br> // Fixed array syntax and message format<br> // $message = CloudMessage::fromArray([<br> // &#39;notification&#39; =&gt; [<br> // &#39;title&#39; =&gt; &#39;First Firebase Notification&#39;,<br> // &#39;body&#39; =&gt; &#39;This is our First Notification Through Laravel&#39;,<br> // ],<br> // &#39;topic&#39; =&gt; &#39;global&#39;, // Fixed the array syntax<br> // ]);<br> // Create a message for a specific device<br> $message = CloudMessage::withTarget(&#39;token&#39;, $deviceToken)<br> -&gt;withNotification(Notification::create(&#39;First Firebase Notification&#39;, &#39;This is our First Notification Through Laravel&#39;));<br><br> // Sending the notification<br> // $messaging-&gt;send($message);<br><br> try {<br> $messaging-&gt;send($message);<br> return response()-&gt;json([&#39;message&#39; =&gt; &#39;Notification Sent Successfully&#39;]);<br> } catch (\Kreait\Firebase\Exception\Messaging\NotFound $e) {<br> return response()-&gt;json([&#39;error&#39; =&gt; &#39;Notification entity not found: &#39; . $e-&gt;getMessage()], 404);<br> } catch (\Exception $e) {<br> return response()-&gt;json([&#39;error&#39; =&gt; &#39;An error occurred: &#39; . $e-&gt;getMessage()], 500);<br> }<br> <br> // Return success response<br> return response()-&gt;json([&#39;message&#39; =&gt; &#39;Notification Sent Successfully&#39;]);<br> }<br>}</pre><p>5 create route in api or web</p><pre>Route::get(&#39;/sendNotificationapi&#39;,[FirebaseNotificationController::class,&#39;sendNotification&#39;])-&gt;name(&#39;sendNotification&#39;);</pre><p>contact me if any inquery = pritammaheshwari188@gmail.com<br>linkedin = <a href="https://www.linkedin.com/in/pritam-maheshwari-335660176/">https://www.linkedin.com/in/pritam-maheshwari-335660176/</a></p><p>pritammaheshwari188@gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=274caf04f8ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uncaught TypeError: Cannot read properties of undefined (reading ‘replace’)]]></title>
            <link>https://medium.com/@pritammaheshwari188/uncaught-typeerror-cannot-read-properties-of-undefined-reading-replace-69e713bf473f?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/69e713bf473f</guid>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Sat, 04 May 2024 17:51:05 GMT</pubDate>
            <atom:updated>2024-05-04T17:51:05.396Z</atom:updated>
            <content:encoded><![CDATA[<p>error file name</p><p>(editor.min.js?ver=6.5.2:2:8277)</p><p>Bug code</p><p>return ( (-1 === (e = (e = -1 !== (e = e.replace(/\r\n|\r/g, “\n”)).indexOf(“&lt;object”) ? e.replace(/&lt;object[\s\S]+?&lt;\/object&gt;/g, function (e) { return e.replace(/\n+/g, “”); }) : e).replace(/&lt;[^&lt;&gt;]+&gt;/g, function (e) { return e.replace(/[\n\t ]+/g, “ “); })).indexOf(“&lt;pre”) &amp;&amp; -1 === e.indexOf(“&lt;script”)) || ((t = !0), (e = e.replace(/&lt;(pre|script)[^&gt;]*&gt;[\s\S]*?&lt;\/\1&gt;/g, function (e) { return e.replace(/\n/g, “&lt;wp-line-break&gt;”); }))), -1 !== (e = -1 !== e.indexOf(“&lt;figcaption”) ? (e = e.replace(/\s*(&lt;figcaption[^&gt;]*&gt;)/g, “$1”)).replace(/&lt;\/figcaption&gt;\s*/g, “&lt;/figcaption&gt;”) : e).indexOf(“[caption”) &amp;&amp; ((n = !0), (e = e.replace(/\[caption[\s\S]+?\[\/caption\]/g, function (e) { return (e = (e = e.replace(/&lt;br([^&gt;]*)&gt;/g, “&lt;wp-temp-br$1&gt;”)).replace(/&lt;[^&lt;&gt;]+&gt;/g, function (e) { return e.replace(/[\n\t ]+/, “ “); })).replace(/\s*\n\s*/g, “&lt;wp-temp-br /&gt;”); }))), (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e += “\n\n”).replace(/&lt;br \/&gt;\s*&lt;br \/&gt;/gi, “\n\n”)).replace( new RegExp(“(&lt;(?:” + i + “)(?: [^&gt;]*)?&gt;)”, “gi”), “\n\n$1” )).replace(new RegExp(“(&lt;/(?:” + i + “)&gt;)”, “gi”), “$1\n\n”)).replace(/&lt;hr( [^&gt;]*)?&gt;/gi, “&lt;hr$1&gt;\n\n”)).replace(/\s*&lt;option/gi, “&lt;option”)).replace(/&lt;\/option&gt;\s*/gi, “&lt;/option&gt;”)).replace( /\n\s*\n+/g, “\n\n” )).replace(/([\s\S]+?)\n\n/g, “&lt;p&gt;$1&lt;/p&gt;\n”)).replace(/&lt;p&gt;\s*?&lt;\/p&gt;/gi, “”)).replace(new RegExp(“&lt;p&gt;\\s*(&lt;/?(?:” + i + “)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;”, “gi”), “$1”)).replace(/&lt;p&gt;(&lt;li.+?)&lt;\/p&gt;/gi, “$1”)).replace( /&lt;p&gt;\s*&lt;blockquote([^&gt;]*)&gt;/gi, “&lt;blockquote$1&gt;&lt;p&gt;” )).replace(/&lt;\/blockquote&gt;\s*&lt;\/p&gt;/gi, “&lt;/p&gt;&lt;/blockquote&gt;”)).replace(new RegExp(“&lt;p&gt;\\s*(&lt;/?(?:” + i + “)(?: [^&gt;]*)?&gt;)”, “gi”), “$1”)).replace( new RegExp(“(&lt;/?(?:” + i + “)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;”, “gi”), “$1” )).replace(/(&lt;br[^&gt;]*&gt;)\s*\n/gi, “$1”)).replace(/\s*\n/g, “&lt;br /&gt;\n”)).replace(new RegExp(“(&lt;/?(?:” + i + “)[^&gt;]*&gt;)\\s*&lt;br /&gt;”, “gi”), “$1”)).replace( /&lt;br \/&gt;(\s*&lt;\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)&gt;)/gi, “$1” )).replace(/(?:&lt;p&gt;|&lt;br ?\/?&gt;)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:&lt;\/p&gt;|&lt;br ?\/?&gt;)*/gi, “[caption$1[/caption]”)).replace(/(&lt;(?:div|th|td|form|fieldset|dd)[^&gt;]*&gt;)(.*?)&lt;\/p&gt;/g, function (e, t, n) { return n.match(/&lt;p( [^&gt;]*)?&gt;/) ? e : t + “&lt;p&gt;” + n + “&lt;/p&gt;”; })), t &amp;&amp; (e = e.replace(/&lt;wp-line-break&gt;/g, “\n”)), (e = n ? e.replace(/&lt;wp-temp-br([^&gt;]*)&gt;/g, “&lt;br$1&gt;”) : e) );</p><p>fixed code</p><p>return (<br> -1 === (<br> e = (<br> e = -1 !== (<br> e = e.replace(/\r\n|\r/g, “\n”)<br> ).indexOf(“&lt;object”) ? e.replace(/&lt;object[\s\S]+?&lt;\/object&gt;/g, function (match) {<br> return match.replace(/\n+/g, “”);<br> }) : e<br> ).replace(/&lt;[^&lt;&gt;]+&gt;/g, function (match) {<br> return match.replace(/[\n\t ]+/g, “ “);<br> })<br> ).indexOf(“&lt;pre”) &amp;&amp; -1 === e.indexOf(“&lt;script”)<br>) || (<br> (t = !0),<br> (e = e.replace(/&lt;(pre|script)[^&gt;]*&gt;[\s\S]*?&lt;\/\1&gt;/g, function (match) {<br> return match.replace(/\n/g, “&lt;wp-line-break&gt;”);<br> }))<br>),<br>-1 !== (<br> e = -1 !== e.indexOf(“&lt;figcaption”) ? (<br> e = e.replace(/\s*(&lt;figcaption[^&gt;]*&gt;)/g, “$1”)<br> ).replace(/&lt;\/figcaption&gt;\s*/g, “&lt;/figcaption&gt;”) : e<br>).indexOf(“[caption”) &amp;&amp; (<br> n = !0,<br> e = e.replace(/\[caption[\s\S]+?\[\/caption\]/g, function (match) {<br> return (match = (<br> match = match.replace(/&lt;br([^&gt;]*)&gt;/g, “&lt;wp-temp-br$1&gt;”)<br> ).replace(/&lt;[^&lt;&gt;]+&gt;/g, function (tag) {<br> return tag.replace(/[\n\t ]+/, “ “);<br> })).replace(/\s*\n\s*/g, “&lt;wp-temp-br /&gt;”);<br> })<br>),<br>(e += “\n\n”).replace(/&lt;br \/&gt;\s*&lt;br \/&gt;/gi, “\n\n”).replace(<br> new RegExp(“(&lt;(?:” + i + “)(?: [^&gt;]*)?&gt;)”, “gi”), “\n\n$1”<br>).replace(<br> new RegExp(“(&lt;/?(?:” + i + “)&gt;)”, “gi”), “$1\n\n”<br>).replace(/&lt;hr( [^&gt;]*)?&gt;/gi, “&lt;hr$1&gt;\n\n”).replace(<br> /\s*&lt;option/gi, “&lt;option”<br>).replace(/&lt;\/option&gt;\s*/gi, “&lt;/option&gt;”).replace(<br> /\n\s*\n+/g, “\n\n”<br>).replace(<br> /([\s\S]+?)\n\n/g, “&lt;p&gt;$1&lt;/p&gt;\n”<br>).replace(<br> /&lt;p&gt;\s*?&lt;\/p&gt;/gi, “”<br>).replace(<br> new RegExp(“&lt;p&gt;\\s*(&lt;/?(?:” + i + “)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;”, “gi”), “$1”<br>).replace(<br> /&lt;p&gt;(&lt;li.+?)&lt;\/p&gt;/gi, “$1”<br>).replace(<br> /&lt;p&gt;\s*&lt;blockquote([^&gt;]*)&gt;/gi, “&lt;blockquote$1&gt;&lt;p&gt;”<br>).replace(<br> /&lt;\/blockquote&gt;\s*&lt;\/p&gt;/gi, “&lt;/p&gt;&lt;/blockquote&gt;”<br>).replace(<br> new RegExp(“&lt;p&gt;\\s*(&lt;/?(?:” + i + “)(?: [^&gt;]*)?&gt;)”, “gi”), “$1”<br>).replace(<br> new RegExp(“(&lt;/?(?:” + i + “)(?: [^&gt;]*)?&gt;)\\s*&lt;/p&gt;”, “gi”), “$1”<br>).replace(<br> /(&lt;br[^&gt;]*&gt;)\s*\n/gi, “$1”<br>).replace(<br> /\s*\n/g, “&lt;br /&gt;\n”<br>).replace(<br> new RegExp(“(&lt;/?(?:” + i + “)[^&gt;]*&gt;)\\s*&lt;br /&gt;”, “gi”), “$1”<br>).replace(<br> /&lt;br \/&gt;(\s*&lt;\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)&gt;)/gi, “$1”<br>).replace(<br> /(?:&lt;p&gt;|&lt;br ?\/?&gt;)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:&lt;\/p&gt;|&lt;br ?\/?&gt;)*/gi, “[caption$1[/caption]”<br>).replace(<br> /(&lt;(?:div|th|td|form|fieldset|dd)[^&gt;]*&gt;)(.*?)&lt;\/p&gt;/g, function (match, openTag, content) {<br> return content.match(/&lt;p( [^&gt;]*)?/) ? match : openTag + “&lt;p&gt;” + content + “&lt;/p&gt;”;<br> }<br>),<br>t &amp;&amp; (e = e.replace(/&lt;wp-line-break&gt;/g, “\n”)),<br>(e = n ? e.replace(/&lt;wp-temp-br([^&gt;]*)&gt;/g, “&lt;br$1&gt;”) : e)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69e713bf473f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate press theme css for post grid fix]]></title>
            <link>https://medium.com/@pritammaheshwari188/generate-press-theme-css-for-post-grid-fix-755d3527694e?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/755d3527694e</guid>
            <category><![CDATA[generatepress]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[grid-layout]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Mon, 20 Nov 2023 00:47:56 GMT</pubDate>
            <atom:updated>2023-11-20T00:47:56.604Z</atom:updated>
            <content:encoded><![CDATA[<p>Refrence blog webiste</p><p><a href="https://www.buildthatwebsite.com/video/responsive-grid-layout-card-design-for-wordpress-archives">Responsive Grid Layout &amp; Card Design for WordPress Archives - BuildThatWebsite</a></p><p>Before Added css</p><p><a href="https://dhabladheer.online/">https://dhabladheer.online/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vJIhTQoSXIvt1wYe8SKbrg.png" /></figure><p>/* post grid auto-columns */<br>.archive #main, .blog #main {<br> display: grid; /*creates the grid*/<br> grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /*responsive columns*/<br> grid-gap: 20px; /*gap between cards*/<br>}</p><p>/* stretch first grid item to full-width (if needed). Required for GeneratePress */<br>.archive #main .page-header, .blog #main .page-header {<br> grid-column: 1 / -1<br>}</p><p>/* grid for the card layout*/</p><p>.archive #main .inside-article, .blog #main .inside-article {<br> height: 100%;<br> display: grid;<br> grid-template-rows: auto 1fr auto;<br> transition: all .2s;<br>}</p><p>.archive #main .inside-article, .blog #main .inside-article {<br> border:1px solid #ddd;<br> border-radius: 8px;<br> overflow: hidden;<br>}</p><p>/* aspect ratio images */<br>.archive #main .inside-article .post-image img, .blog #main .inside-article .post-image img {<br> aspect-ratio: 16/9;<br> object-fit: cover<br> <br>}<br> <br>/* hide post excerpt */<br>.archive #main .inside-article .entry-summary, .blog #main .inside-article .entry-summary {<br> display: none;<br>}</p><p>.archive #main .inside-article h2.entry-title, .blog #main .inside-article h2.entry-title {<br> font-size: 27px;<br> font-weight: 600;<br>}</p><p>.archive #main .inside-article:hover, .blog #main .inside-article:hover {<br> box-shadow: 0 0 20px rgb(0,0,0, .2);<br> border-color: lightblue;<br>}</p><p>.archive #main .inside-article:hover .post-image img, .blog #main .inside-article:hover .post-image img {<br> transform: scale(1.04);<br>}</p><p>.archive #main .inside-article .post-image img, .blog #main .inside-article .post-image img {<br> transition: transform .2s;<br>}</p><p>.archive #main .inside-article .post-image , .blog #main .inside-article .post-image {<br> overflow: hidden;<br> aspect-ratio: 16/9;<br>}</p><p>After Added css</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vTvZuTH9Fj_T-rm-zv98Kw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=755d3527694e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Remove .php from url and make user friendly url in php]]></title>
            <link>https://medium.com/@pritammaheshwari188/remove-php-from-url-and-make-user-friendly-url-in-php-115b453c15af?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/115b453c15af</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Sat, 16 Sep 2023 03:01:28 GMT</pubDate>
            <atom:updated>2023-09-16T03:01:28.292Z</atom:updated>
            <content:encoded><![CDATA[<h3>Remove .php from url and make user friendly url in php</h3><p>To remove the .php extension from your URLs in a Core PHP website, you&#39;ll need to use URL rewriting techniques. This can be achieved using Apache&#39;s mod_rewrite module, which allows you to create user-friendly URLs.</p><p>Here are the steps you can follow:</p><ol><li>Enable mod_rewrite: Make sure that the mod_rewrite module is enabled in your Apache server configuration. You can do this by opening your httpd.conf file and ensuring that the following line is not commented out:</li></ol><p>LoadModule rewrite_module modules/mod_rewrite.so</p><ol><li>If you make any changes, remember to restart your Apache server.</li><li>Create a .htaccess file: In the root directory of your website, create a file named .htaccess if it doesn&#39;t already exist.</li><li>Add Rewrite Rules: Open the .htaccess file and add the following lines:</li></ol><p>RewriteEngine On<br>RewriteCond %{REQUEST_FILENAME} !-d<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteRule ^([^\.]+)$ $1.php [NC,L]</p><ol><li>This code snippet checks if the requested file or directory does not exist, and if so, it appends a .php extension to the request.</li><li>Test: Try accessing your pages without the .php extension in the URL (e.g., https://insightinfo.tech/contact). If everything is set up correctly, it should work as expected.</li></ol><p>Remember that this approach assumes you’re using an Apache web server. If you’re using a different server, the steps may be slightly different. Always back up your files before making changes to configuration files.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=115b453c15af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to upload video using Laravel fun]]></title>
            <link>https://medium.com/@pritammaheshwari188/how-to-upload-video-using-laravel-fun-bbbe172574b9?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbbe172574b9</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[php-developers]]></category>
            <category><![CDATA[laravel-development]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 03:06:52 GMT</pubDate>
            <atom:updated>2023-08-02T03:06:52.438Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to upload video using Laravel function</h3><h4>public function uploadVideo(Request $request)</h4><p>{</p><p>$request-&gt;validate([</p><p>‘videoFile’ =&gt; ‘required|mimes:mp4|max:10240’, // Max file size: 10 MB</p><p>]);</p><p>if ($request-&gt;hasFile(‘videoFile’)) {</p><p>$videoFile = $request-&gt;file(‘videoFile’);</p><p>$filename = time() . ‘_’ . $videoFile-&gt;getClientOriginalName();</p><p>// Move the uploaded file to the storage directory</p><p>$videoFile-&gt;storeAs(‘public/videos’, $filename);</p><p>// Insert the video’s filename into the database</p><p>Video::create([‘filename’ =&gt; $filename]);</p><p>return redirect()-&gt;back()-&gt;with(‘success’, ‘Video uploaded successfully!’);</p><p>}</p><p>return redirect()-&gt;back()-&gt;with(‘error’, ‘Failed to upload video.’);</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbbe172574b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[laravel custom login system]]></title>
            <link>https://medium.com/@pritammaheshwari188/laravel-custom-login-system-4e1d1d31f096?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e1d1d31f096</guid>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[language-learning]]></category>
            <category><![CDATA[php-developers]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[laravel-development]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 03:04:43 GMT</pubDate>
            <atom:updated>2023-08-02T03:04:43.749Z</atom:updated>
            <content:encoded><![CDATA[<p>public function login(Request $request)</p><p>{</p><p>$request-&gt;validate([</p><p>‘email’ =&gt; ‘required|string|email’,</p><p>‘password’ =&gt; ‘required|string’,</p><p>]);</p><p>$credentials = $request-&gt;only(‘email’, ‘password’);</p><p>if (Auth::attempt($credentials)) {</p><p>return redirect()-&gt;intended(‘dashboard’);</p><p>}</p><p>echo “crediantial not match”;</p><p>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e1d1d31f096" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel starter template creation]]></title>
            <link>https://medium.com/@pritammaheshwari188/laravel-starter-template-creation-d91044588a63?source=rss-9268921af7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/d91044588a63</guid>
            <category><![CDATA[laravel-development]]></category>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[larvel]]></category>
            <dc:creator><![CDATA[pritam maheshwari]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 03:03:02 GMT</pubDate>
            <atom:updated>2023-08-02T03:03:02.741Z</atom:updated>
            <content:encoded><![CDATA[<h3>&lt;!doctype html&gt;</h3><p>&lt;html class=”no-js” lang=”en”&gt;</p><p>&lt;head&gt;</p><p>&lt;meta charset=”utf-8&quot;&gt;</p><p>&lt;meta http-equiv=”x-ua-compatible” content=”ie=edge”&gt;</p><p>&lt;title&gt;@yield(‘title’,’Dashboard’)&lt;/title&gt;</p><p>&lt;meta name=”description” content=””&gt;</p><p>&lt;meta name=”viewport” content=”width=device-width, initial-scale=1&quot;&gt;</p><p>&lt;! — favicon</p><p>============================================ →</p><p>@include(‘admin.layout.css’)</p><p>============================================ →</p><p>&lt;script src=”{{asset(‘js/vendor/modernizr-2.8.3.min.js’)}}”&gt;&lt;/script&gt;</p><p>&lt;/head&gt;</p><p>&lt;body&gt;</p><p>&lt;! — [if lt IE 8]&gt;</p><p>&lt;p class=”browserupgrade”&gt;You are using an &lt;strong&gt;outdated&lt;/strong&gt; browser. Please &lt;a href=”http://browsehappy.com/&quot;&gt;upgrade your browser&lt;/a&gt; to improve your experience.&lt;/p&gt;</p><p>&lt;![endif] →</p><p>@include(‘admin.layout.navbar’);</p><p>&lt;! — Mobile Menu end →</p><p>@yield(‘content’)</p><p>{{ — footer start — }}</p><p>@include(‘admin.layout.footer’)</p><p>&lt;/div&gt;</p><p>@include(‘admin.layout.script’)</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;</p><p>— — — — — — -</p><p>blade file code</p><p>@extends(‘admin.layout.master’)</p><p>@section(‘content’)</p><p>//content of the file</p><p>@endsection</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d91044588a63" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>