<?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 control flow Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/laravel-control-flow/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/laravel-control-flow/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Thu, 11 Mar 2021 08:46:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>How Control flow in Laravel</title>
		<link>https://www.scmgalaxy.com/tutorials/how-control-flow-in-laravel/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-control-flow-in-laravel/#respond</comments>
		
		<dc:creator><![CDATA[abhishek k]]></dc:creator>
		<pubDate>Thu, 11 Mar 2021 08:46:30 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[control flow explanation]]></category>
		<category><![CDATA[control flow in laravel]]></category>
		<category><![CDATA[laravel control flow]]></category>
		<category><![CDATA[laravel project]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5456</guid>

					<description><![CDATA[<p>Route::get(&#8216;task&#8217;,&#8217;TaskController@index&#8217;)-&#62;name(&#8216;task&#8217;); Explanation:- name(&#8216;task&#8216;) is given in the URL as http://127.0.0.1:8000/task. Control flow:- As the URL is hit the control will [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-control-flow-in-laravel/">How Control flow in Laravel</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>Route::get(&#8216;task&#8217;,&#8217;TaskController@index&#8217;)-&gt;name(&#8216;task&#8217;);</em>                                        Explanation:-                                                                                                                              name(&#8216;<strong>task</strong>&#8216;) is given in the URL as <strong>http://127.0.0.1:8000/task</strong>.                                         <span class="has-inline-color has-vivid-red-color"><strong>Control flow</strong></span>:-                                                                                                                                                                                                                  As the URL is hit the control will go the route(<strong><em>web.php</em></strong>), there it will get <em>Route::get(&#8216;task&#8217;,&#8217;TaskController@index&#8217;)-&gt;name(&#8216;task&#8217;);</em>                                                       Here, there will be a name match from the URL and if there is match then there will be a function call named <strong>index</strong> and route will redirect to <em><strong>TaskController.php</strong></em> where it will find the function <em>index </em>and operate according to the instructions given inside it.                                                                       </p>



<p class="wp-block-paragraph">After the create operation we need to store the data in the database for this we used <strong><em>&lt;form&nbsp;action=&#8221;{{route(&#8216;store&#8217;)}}&#8221;&nbsp;method=&#8221;POST&#8221;&gt;</em></strong> which will call store function.                                                                                                                                  The store function be like                                                                                                        </p>



<script src="https://gist.github.com/abhi040498/c57065a3124ffb12ff36e63334907604.js"></script>



<p class="wp-block-paragraph">The in store function we create object <strong>$var</strong> of <strong>Task </strong>class make variables as <strong>$var-&gt;task</strong>&nbsp;which is assigned&nbsp;<strong>$request-&gt;task;</strong>&nbsp;(gets value from 1<sup>st</sup> field) &amp; <strong>$var-&gt;detail </strong>which is assigned&nbsp;<strong>$request-&gt;detail;</strong>&nbsp;(gets value from 2<sup>nd</sup> field) and <strong><em>$var-&gt;save(); </em></strong>function will save it to the database.</p>



<p class="wp-block-paragraph">                               </p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-control-flow-in-laravel/">How Control flow in Laravel</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-control-flow-in-laravel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
