<?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>upload image Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/upload-image/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/upload-image/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Fri, 19 Mar 2021 13:03:05 +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 to upload image in the database and send mail image</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-upload-image-in-the-database-and-send-mail-image/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-upload-image-in-the-database-and-send-mail-image/#respond</comments>
		
		<dc:creator><![CDATA[shashank K]]></dc:creator>
		<pubDate>Fri, 19 Mar 2021 12:47:09 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[upload image]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5657</guid>

					<description><![CDATA[<p>1st step:- Open command prompt in C:\xampp\htdocs. 2nd step:- Write the code given below in the opened command prompt to [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-upload-image-in-the-database-and-send-mail-image/">How to upload image in the database and send mail image</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>1<sup>st</sup> step</strong>:- Open command prompt in C:\xampp\htdocs.</p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-2-1024x576.png" alt="" class="wp-image-5658" width="474" height="266" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-2-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-2-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-2-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-2-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-2.png 1920w" sizes="(max-width: 474px) 100vw, 474px" /></figure></div>



<p class="wp-block-paragraph"><strong>2<sup>nd</sup> step:-</strong> Write the code given below in the opened command prompt to make laravel project.</p>



<pre class="wp-block-preformatted">&nbsp;&nbsp; composer create-project --prefer-dist laravel/laravel ImageUpload "5.8.*"</pre>



<pre class="wp-block-preformatted"></pre>



<p class="wp-block-paragraph"><strong>3<sup>rd</sup> step:-</strong> After the project is created, open the folder in any code editor.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-4-1024x576.png" alt="" class="wp-image-5659" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-4-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-4-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-4-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-4-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-4.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>4<sup>th</sup> step:-</strong> Now open xampp. And make a database.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-5-1024x576.png" alt="" class="wp-image-5660" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-5-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-5-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-5-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-5-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-5.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>5<sup>th</sup> step:-</strong> Open the .env file of the project and change the name of the database same as defined in phpmyadmin.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-6-1024x576.png" alt="" class="wp-image-5661" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-6-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-6-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-6-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-6-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-6.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>6<sup>th</sup> step:-</strong> Write the code given below in command prompt to make controller.</p>



<p class="wp-block-paragraph"><strong>php artisan make:controller</strong><strong> </strong>ImageUpload</p>



<p class="wp-block-paragraph"><strong>7<sup>th</sup> step:-</strong> Write the code given below in command prompt to make model.</p>



<p class="wp-block-paragraph">&nbsp; <strong>php artisan make:model</strong><strong> </strong>ImageUpload<strong> </strong><strong>–m</strong></p>



<p class="wp-block-paragraph"><strong>8<sup>th</sup> step:-</strong> write the name of the column of the databse in</p>



<p class="wp-block-paragraph"><strong>database\migrations\2020_10_23_070450_create_ images _</strong><strong> </strong><strong>upload _table.php</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-7-1024x576.png" alt="" class="wp-image-5662" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-7-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-7-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-7-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-7-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-7.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>9<sup>th</sup> step:-</strong> Write the code given below in command prompt to migrate the table to the database.</p>



<p class="wp-block-paragraph"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong><strong>php artisan migrate</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-8-1024x576.png" alt="" class="wp-image-5663" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-8-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-8-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-8-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-8-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-8.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>10<sup>th</sup> step:-</strong>Then make view page in resource\views</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-10-1024x576.png" alt="" class="wp-image-5664" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-10-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-10-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-10-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-10-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-10.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Code of <strong>imageupload.blade.php</strong></p>



<script src="https://gist.github.com/shashank969/66502b1755eb7d1c9a48566b1d1d0b67.js"></script>



<p class="wp-block-paragraph"><strong>11<sup>th</sup> step:-</strong> Make one blade file <strong>resources/view/dynamic_email_template.blade.php</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-11-1024x576.png" alt="" class="wp-image-5665" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-11-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-11-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-11-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-11-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-11.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>And paste the code given below:-</strong></p>



<p class="wp-block-paragraph">&lt;p&nbsp;style=&#8221;margin-left:10%;&#8221;&gt;First&nbsp;Name&nbsp;&#8211;&nbsp;&lt;b&gt;{{&nbsp;$data[&#8216;name&#8217;]&nbsp;}}&nbsp;&lt;/b&gt;&lt;/p&gt;</p>



<p class="wp-block-paragraph">&lt;p&nbsp;style=&#8221;margin-left:10%;&#8221;&gt;last&nbsp;Name&nbsp;&#8211;&nbsp;&lt;b&gt;{{&nbsp;$data[&#8217;email&#8217;]&nbsp;}}&nbsp;&nbsp;&lt;/b&gt;&lt;/p&gt;</p>



<p class="wp-block-paragraph">&lt;p&gt;It&nbsp;would&nbsp;be&nbsp;appriciative,&nbsp;if&nbsp;you&nbsp;gone&nbsp;through&nbsp;this&nbsp;feedback.&lt;/p&gt;</p>



<p class="wp-block-paragraph"><strong>12<sup>th</sup> step:-</strong> Go to <strong>web.php</strong> and make routes.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-12-1024x576.png" alt="" class="wp-image-5666" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-12-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-12-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-12-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-12-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-12.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">The code is given below:-</p>



<p class="wp-block-paragraph">Route::get(&#8216;sendemail&#8217;,&#8217;SendEmailController@index&#8217;);</p>



<p class="wp-block-paragraph">Route::post(&#8216;sendemail.store&#8217;,&#8217;SendEmailController@store&#8217;)-&gt;name(&#8216;sendemail.store&#8217;);</p>



<p class="wp-block-paragraph"><strong>13<sup>th</sup> step:-</strong> Go to controller and call model class</p>



<p class="wp-block-paragraph">Paste the code given below below </p>



<script src="https://gist.github.com/shashank969/164b6f563be83821fa9d242c5b493166.js"></script>



<p class="wp-block-paragraph"><strong>14<sup>th</sup> step:-</strong> Now make the mail. Write the code given below in command prompt:-</p>



<p class="wp-block-paragraph"><strong>php artisan make:mail SendMail</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-13-1024x576.png" alt="" class="wp-image-5667" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-13-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-13-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-13-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-13-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Screenshot-13.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph"><strong>15<sup>th</sup> step:-</strong> Paste the code given below in the file made by the above command:-</p>



<script src="https://gist.github.com/shashank969/a13b3a70e424fa8d939949f5bfa61dfd.js"></script>



<p class="wp-block-paragraph"><strong>16<sup>th</sup> step:-</strong> Make an account in mailtrap. 17<sup>th</sup> step.</p>



<p class="wp-block-paragraph"><strong>17<sup>th</sup> step:-</strong> copy host, port, Username and password.</p>



<p class="wp-block-paragraph"><strong>18<sup>th</sup> step:-</strong>configure <strong>.env</strong> file with the details copied by the mailtrap id.</p>



<p class="wp-block-paragraph"><strong>19<sup>th</sup> step:-</strong> Now run the command given below in the terminal.</p>



<p class="wp-block-paragraph"><strong>php artisan c:cache</strong></p>



<p class="wp-block-paragraph"><strong>php artisan serve</strong></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-upload-image-in-the-database-and-send-mail-image/">How to upload image in the database and send mail image</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-upload-image-in-the-database-and-send-mail-image/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
