<?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 Sujal Patel on Medium]]></title>
        <description><![CDATA[Stories by Sujal Patel on Medium]]></description>
        <link>https://medium.com/@sujalpatel022?source=rss-8b176db03c8c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ybl9QEDCp2eSqB6ob22Clw.jpeg</url>
            <title>Stories by Sujal Patel on Medium</title>
            <link>https://medium.com/@sujalpatel022?source=rss-8b176db03c8c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 23:07:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sujalpatel022/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[Blade Template Using in Laravel Layout]]></title>
            <link>https://medium.com/@sujalpatel022/blade-template-using-in-laravel-layout-148665906b77?source=rss-8b176db03c8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/148665906b77</guid>
            <category><![CDATA[blade]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[template]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[blade-templating-engine]]></category>
            <dc:creator><![CDATA[Sujal Patel]]></dc:creator>
            <pubDate>Sun, 02 Jun 2019 05:45:03 GMT</pubDate>
            <atom:updated>2019-06-12T06:07:05.773Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sW-OHuzP2r0xc2HpFlSnoQ.png" /></figure><p>A simple and easy way to use the Blade templating engine to get a fully ready layout system.</p><p>We will create a few site pages (home, about, projects, contact). Here is a list of the pages that we will use and the layouts that they will use.</p><ul><li>Home- Full-Width Layout</li><li>About- Sidebar Layout</li><li>Projects- Sidebar Layout</li><li>Contact- Full-Width Layout</li></ul><h3>Routing</h3><p>To get our pages to work, we’re going to set up a simple route to get our home page.</p><pre>Route::get(&#39;/&#39;, function()<br>{<br>    return View::make(&#39;pages.home&#39;);<br>});<br>Route::get(&#39;about&#39;, function()<br>{<br>    return View::make(&#39;pages.about&#39;);<br>});<br>Route::get(&#39;projects&#39;, function()<br>{<br>    return View::make(&#39;pages.projects&#39;);<br>});<br>Route::get(&#39;contact&#39;, function()<br>{<br>    return View::make(&#39;pages.contact&#39;);<br>});</pre><p>Since we’re only touching on layouts in Blade, we won’t need to do anything but load a view. We don’t need to mess with controllers or any other fancy things.</p><p>Now that we have our routes setup, we will start our work with the home page. Open up app/views/pages/home.blade.php. Inside of that file, we will pull together a layout file, a page file, and includes. By using the same layout files for multiple pages, we don&#39;t have to repeat ourselves when writing our pages in our sites.</p><h3>Views</h3><h4>The File Structure</h4><p>Let’s create the files necessary for creating a whole templating system. Here are the folders and files. Go ahead and create them.</p><pre>- app<br>-- views<br>--- layouts<br>------- default.blade.php<br>------- sidebar.blade.php<br>--- pages<br>------- home.blade.php<br>------- about.blade.php<br>------- projects.blade.php<br>------- contact.blade.php<br>--- includes<br>------- head.blade.php<br>------- header.blade.php<br>------- footer.blade.php<br>------- sidebar.blade.php</pre><h3>Includes</h3><p>We will use the head, header, and footer includes so that we don’t have to rewrite that code. Let’s get those out of the way real quick.</p><h4>head.blade.php</h4><pre>&lt;meta charset=&quot;utf-8&quot;&gt;<br>&lt;meta name=&quot;description&quot; content=&quot;&quot;&gt;<br>&lt;meta name=&quot;author&quot; content=&quot;Scotch&quot;&gt;<br><br>&lt;title&gt;Super Cool Layouts&lt;/title&gt;<br><br>&lt;!-- load bootstrap from a cdn --&gt;<br>&lt;link rel=&quot;stylesheet&quot; href=&quot;//<a href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css">netdna.bootstrapcdn.com/twitter-bootstrap/3.0.3/css/bootstrap-combined.min.css</a>&quot;&gt;</pre><h4>header.blade.php</h4><pre>&lt;div class=&quot;navbar&quot;&gt;<br>    &lt;div class=&quot;navbar-inner&quot;&gt;<br>        &lt;a id=&quot;logo&quot; href=&quot;/&quot;&gt;Single Malt&lt;/a&gt;<br>        &lt;ul class=&quot;nav&quot;&gt;<br>            &lt;li&gt;&lt;a href=&quot;/&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;/about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;/projects&quot;&gt;Projects&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;/contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br>        &lt;/ul&gt;<br>    &lt;/div&gt;<br>&lt;/div&gt;</pre><h4>footer.blade.php</h4><pre>&lt;div id=&quot;copyright text-right&quot;&gt;© Copyright 2019 Sujal Patel&lt;/div&gt;</pre><h3>Default Layout and Pages (Home, Contact)</h3><p>With our includes ready, let’s make our first layout.</p><p>We will be using @include to bring in slices and @yield to bring in content from the individual pages we will be using.</p><pre>&lt;!doctype html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    @include(&#39;includes.head&#39;)<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;div class=&quot;container&quot;&gt;<br><br>    &lt;header class=&quot;row&quot;&gt;<br>        @include(&#39;includes.header&#39;)<br>    &lt;/header&gt;<br><br>    &lt;div id=&quot;main&quot; class=&quot;row&quot;&gt;<br><br>            @yield(&#39;content&#39;)</pre><pre>    &lt;/div&gt;<br><br>    &lt;footer class=&quot;row&quot;&gt;<br>        @include(&#39;includes.footer&#39;)<br>    &lt;/footer&gt;<br><br>&lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Home Page and Contact Page</h3><p>We won’t dive too far into the actual content of each page. The home page and contact pages will use the same layouts/default.blade.php. We won&#39;t have to reuse the code in the layout or the includes now!</p><p>Blade lets us use the layout that we just created by using @extends. By creating @section, we create a section that will be used in the layout. Here we use @section(&#39;content&#39;) and in our layout, all that we type here will be injected in @yield in the layout.</p><h3>pages/home.blade.php</h3><pre>@extends(&#39;layouts.default&#39;)<br>@section(&#39;content&#39;)<br>    Home Page<br>@stop</pre><h3>pages/contact.blade.php</h3><pre>@extends(&#39;layouts.default&#39;)<br>@section(&#39;content&#39;)<br>    Contact Page<br>@stop</pre><h3>Sidebar Layout and Pages</h3><p>With our default layout and those pages out of the way, we can make our sidebar include, sidebar layout, and pages.</p><h4>Sidebar Include includes/sidebar.blade.php</h4><pre>&lt;!-- sidebar nav --&gt;<br>    &lt;nav id=&quot;sidebar-nav&quot;&gt;<br>        &lt;ul class=&quot;nav nav-pills nav-stacked&quot;&gt;<br>            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Fly to the Moon&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Dig to China&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Swim Across the Sea&lt;/a&gt;&lt;/li&gt;<br>        &lt;/ul&gt;<br>    &lt;/nav&gt;</pre><h4>Sidebar Layout layouts/sidebar.blade.php</h4><p>The difference between this layout and the default layout is the sidebar. We add that to the main section with the help of Twitter Bootstrap classes. Now we have a sidebar on the left and our content on the right. We can adjust this however we want to create any size sidebar either on the left or the right.</p><pre>&lt;!doctype html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    @include(&#39;includes.head&#39;)<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;div class=&quot;container&quot;&gt;<br><br>    &lt;header class=&quot;row&quot;&gt;<br>        @include(&#39;includes.header&#39;)<br>    &lt;/header&gt;<br><br>    &lt;div id=&quot;main&quot; class=&quot;row&quot;&gt;<br><br>        &lt;!-- sidebar content --&gt;<br>        &lt;div id=&quot;sidebar&quot; class=&quot;col-md-4&quot;&gt;<br>            @include(&#39;includes.sidebar&#39;)<br>        &lt;/div&gt;<br><br>        &lt;!-- main content --&gt;<br>        &lt;div id=&quot;content&quot; class=&quot;col-md-8&quot;&gt;<br>            @yield(&#39;content&#39;)<br>        &lt;/div&gt;<br><br>    &lt;/div&gt;<br><br>    &lt;footer class=&quot;row&quot;&gt;<br>        @include(&#39;includes.footer&#39;)<br>    &lt;/footer&gt;<br><br>&lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>About and Projects Pages</h3><p>Like the home and contact pages, we won’t dive into the content. Just a simple use of the layout and adding content.</p><h4>pages/about.blade.php</h4><pre>@extends(&#39;layouts.sidebar&#39;)<br>@section(&#39;content&#39;)<br>    About Page<br>@stop</pre><h4>pages/projects.blade.php</h4><pre>@extends(&#39;layouts.sidebar&#39;)<br>@section(&#39;content&#39;)<br>    Projects Page<br>@stop</pre><h3>Conclusion</h3><p>Now we can create a simple foundation for the front-end views for our site. Layouts, slices, and pages all work together to create an easy templating system. There is much more that <a href="https://laravel.com/docs/5.8/blade">Laravel Blade Templating</a> and I encourage you to take a look at what else we can do.</p><p>Thanks for reading and let us know if you have any questions or comments or what you’d like us to write about in the comments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*Xdzoto4CT3P42EqyAyLsMQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=148665906b77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup a React Environment Using webpack and Babel]]></title>
            <link>https://medium.com/@sujalpatel022/setup-a-react-environment-using-webpack-and-babel-12e1583df950?source=rss-8b176db03c8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/12e1583df950</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sujal Patel]]></dc:creator>
            <pubDate>Sat, 03 Mar 2018 09:58:38 GMT</pubDate>
            <atom:updated>2019-06-12T06:07:27.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ItHoU8x6M-m7-Pt2UG7cw.png" /></figure><p><a href="https://facebook.github.io/react/">React</a> is a Javascript library, by Facebook, that is used for building user interfaces. It is a bomb library that offers so many advantages but one of the biggest setbacks is the steep learning curve. When I started out, one of the things that bugged me a whole lot was that most of the tutorials skipped over the React environment set-up.</p><p>So here we go, this article is best suited for beginners who aren’t afraid to get their hands dirty setting up a React environment, from scratch. My number one mission is to keep this article simple and easy to understand. I will not use any boilerplates and you can find the whole set-up on my github repo <a href="https://github.com/sujalpatel2209/React_redux_votting_system">here</a>. In this repo. also available votting system Demo using redux.</p><ol><li><a href="https://webpack.github.io/docs/what-is-webpack.html">Webpack</a> — A module bundler</li><li><a href="https://babeljs.io/">Babel</a> — A Javascript compiler</li><li><a href="https://github.com/lukehoban/es6features">ES6</a> — A relatively new Javasript standard</li><li><a href="http://yarnpkg.com/en/docs/getting-started">Yarn</a> — A package manager</li><li>React — As expected</li></ol><p><em>“This article is best suited for beginners who aren’t afraid to get their hands dirty setting up a React environment from scratch.”</em></p><p>By the end of the tutorial, we will have set-up a working React environment and just for fun we will have a simple webpage displaying Hello World.</p><p>Brace yourselves for some fun!!</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-pre-requisites">Pre-requisites</a></h3><p>We require Yarn and Node pre-installed on our machines before we dive into the project.</p><p>As mentioned above we’ll use Yarn Package Manager. It is quite similar to npm and has almost the same commands provided by npm. It also comes with a few extra features that npm does not provide. Just to catch you up, a few of the main reasons I use yarn are:</p><ul><li>If you had already installed a package before, you can install it again without any internet connection. Apart from the fact that you can install packages offline, this also increases the speed of your installments.</li><li>The same exact dependencies are installed on any machine. This essentially means that an install on one machine will work the same exact way on any other machine.</li></ul><p>For more information you could go over the Yarn documentation.</p><p>For Mac Os users, the commands below will suffice to install Yarn and because I got all your backs, anyone using any other OS can head on over to the Yarn installation <a href="http://yarnpkg.com/en/docs/install#mac-tab">page</a> to get the right instructions on installation.</p><p>Related Course: <a href="https://bit.ly/2qktDOA">Getting Started with React</a></p><pre>&gt; brew update<br>&gt; brew install yarn</pre><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-getting-started">Getting Started</a></h3><p>Open your terminal and create a new folder. You can name it as you wish. Navigate into the folder and initialize the project by running yarn init. yarn initjust like npm init will give you a few prompts, just press enter till the end or configure it as you&#39;d like to.</p><pre>&gt; mkdir hello-world-react<br>&gt; cd hello-world-react<br>&gt; yarn init</pre><p>When yarn init is finished you will notice in your folder, in this case &#39;hello-world-react&#39;, you&#39;ll have a new file package.json just like if you had done npm init.</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-webpack-installation-and-configuration">Webpack installation and configuration</a></h3><p>Next, we need to install webpack and a few dependencies.</p><pre>&gt; yarn add webpack webpack-dev-server path</pre><p>Inside ‘hello-world-react’ a new file yarn.lock is created. This file is what Yarn uses to lock down the exact dependencies to use on another machine, you don&#39;t really have to worry about this file as it is automatically generated.</p><p>Now that we have webpack installed we need a config file to give it instructions on what to do. Create a new file, webpack.config.js, on the project folder and open it on your preferred text editor.</p><pre>&gt; touch webpack.config.js</pre><p>We can then update the configuration file:</p><pre>/*<br>    ./webpack.config.js<br>*/<br>const path = require(&#39;path&#39;);<br>module.exports = {<br>  entry: &#39;./client/index.js&#39;,<br>  output: {<br>    path: path.resolve(&#39;dist&#39;),<br>    filename: &#39;index_bundle.js&#39;<br>  },<br>  module: {<br>    loaders: [<br>      { test: /\.js$/, loader: &#39;babel-loader&#39;, exclude: /node_modules/ },<br>      { test: /\.jsx$/, loader: &#39;babel-loader&#39;, exclude: /node_modules/ }<br>    ]<br>  }<br>}</pre><p>Basically, to get a running instance of webpack we need to specify an entry point and an output.</p><ul><li>entry: Specifies the entry file where the bundler starts the bundling process.</li><li>output: Specifies the location where the bundled Javascript code is to be saved.</li></ul><p>We, however, also have loaders. These are needed because we want the browser we use to be able to interprate and run JSX code (for React) and code written in ES6.</p><ul><li>loaders: They are transformations that are applied on a file in our app.</li></ul><p>The loaders key property takes in an array of loaders. For our basic set-up we specified that the babel-loader goes through and transpiles every file that ends with a .js or .jsx extension excluding the files inside the node_modules folder. You could always add more loaders as needed. For example, if you had separate style sheets in your project you&#39;d require a CSS loader. All these loaders can be found in the webpack <a href="https://webpack.github.io/docs/list-of-loaders.html">documentation</a>. Feel free to test them out.</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-setting-up-babel">Setting up Babel</a></h3><p>In our webpack configuration, we specified that we are using a babel-loader. Where does this babel-loader come from you ask? Well, we need to install it and later set a few configurations.</p><pre>&gt; yarn add babel-loader babel-core babel-preset-es2015 babel-preset-react --dev</pre><p>Those are all the dependencies we need for Babel. Notice we have installed babel-preset-es2015 and babel-preset-react, presets are Babel plugins that simply tell Babel what to look out for and transform into plain, vanilla Javascript.</p><p>We then have to configure Babel and we can do this in a new file which we’ll name .babelrc.</p><pre>&gt; touch .babelrc</pre><p>Then we can update the file to:</p><pre>/* <br>    ./.babelrc<br>*/  <br>{<br>    &quot;presets&quot;:[<br>        &quot;es2015&quot;, &quot;react&quot;<br>    ]<br>}</pre><p>That is it. Now when babel-loader is called in the webpack config file it knows what to do.</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-setting-up-our-react-components">Setting up our React Components</a></h3><p>So far our file structure looks like this:</p><pre>.<br>|-- node_modules<br>|-- .babelrc<br>|-- package.json<br>|-- webpack.config.js<br>|-- yarn.lock</pre><p>Its high time we add the React side don’t you think? We’ll create a new folder client and add an index.js file and an index.html file.</p><pre>&gt; mkdir client<br>&gt; cd client<br>&gt; touch index.js<br>&gt; touch index.html<br>&gt; cd ..</pre><p>Now we have this:</p><pre>.<br>|-- client<br>     |-- index.html<br>     |-- index.js<br>|-- .babelrc<br>|-- package.json<br>|-- webpack.config.js<br>|-- yarn.lock</pre><p>Next we need to add some code. We’ll start out with something simple just to verify that our set-up so far works.</p><p>Open up index.js and add:</p><pre>/*<br>    ./client/index.js<br>    which is the webpack entry file<br>*/<br>console.log(&#39;Hey guys and ladies!!&#39;)</pre><p>Update index.html to:</p><pre>/*<br>    ./client/index.html<br>    basic html skeleton<br>*/<br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;utf-8&quot;&gt;<br>    &lt;title&gt;React App Setup&lt;/title&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    &lt;div id=&quot;root&quot;&gt;<br><br>    &lt;/div&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>The index.html is the actual webpage which loads our React Components on the browser. I mentioned before that we need babel in order to compile our code into a syntax that browsers support. We code our React components using JSX and in our case we will also use ES6. The syntax of these two modules is not supported by most browsers therefore, we have to run this code through the babel loadersand then the bundled output is what we&#39;ll specify to be displayed on index.html.</p><p>One way to add the bundled file to our HTML is to insert a script tag and pass the location of the bundled file into the script tag. A better way to do this is to use this nifty package called html-webpack-plugin. It provides an easy way to have all your HTML generated for you. All you need is the standard HTML skeleton and it&#39;ll take care of your script insertions with just a few configurations. Let&#39;s do that next.</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-html-webpack-plugin">Html-Webpack-Plugin</a></h3><p>First, we’ll install the plugin. Make sure your terminal is currently reading you’re root project folder, hello-world-react, then enter the following command:</p><pre>&gt; yarn add html-webpack-plugin</pre><p>Then open up your webpack.config.js and add a few configurations.</p><pre>/* <br>    ./webpack.config.js<br>*/<br>const path = require(&#39;path&#39;);<br><br>const HtmlWebpackPlugin = require(&#39;html-webpack-plugin&#39;);<br>const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({<br>  template: &#39;./client/index.html&#39;,<br>  filename: &#39;index.html&#39;,<br>  inject: &#39;body&#39;<br>})<br><br>module.exports = {<br><br>...<br><br>module: {<br>    loaders: [<br>        ...<br>    ]<br>},<br>// add this line<br>plugins: [HtmlWebpackPluginConfig]<br>}</pre><p>The configuration is pretty self-explanatory. We require the html-webpack-pluginand then create a new instance of it, and set our skeleton HTML as the template. filename refers to the name of the HTML that the plugin will generate. injectbody tells the plugin to add any JavaScript into the bottom of the page, just before the closing body tag.</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-run-it">Run it!</a></h3><p>We are almost at the finish line. Let’s try run our setup. We just need to do one tiny thing first. Open up your package.json and let&#39;s add a start script.</p><pre>/*<br>    ./package.json<br>*/<br>{<br>  &quot;name&quot;: &quot;hello-world-react&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;license&quot;: &quot;MIT&quot;,<br><br>  // add the scripts key to your package.json<br><br>  &quot;scripts&quot;: {<br>    &quot;start&quot;: &quot;webpack-dev-server&quot;<br>  },<br><br>  &quot;dependencies&quot;: {<br>  ...<br>  },<br>  &quot;devDependencies&quot;: {<br>  ...<br>  }<br>}</pre><p>Now we can go to our terminal and run:</p><pre>&gt; yarn start</pre><p>Open your browser on http://localhost:8080/. If you check your console you&#39;ll see our message &quot;Hey guys and ladies!!&quot;. The reason we use localhost:8080 is because webpack-dev-server serves all our files on port 8080. Notice webpack-dev-server is run when we execute our start script.</p><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-react-react-react">React</a></h3><pre>&gt; yarn add react react-dom</pre><p>Next in the client folder we can add a folder named components and create a file App.jsx.</p><pre>&gt; cd client<br>&gt; mkdir components <br>&gt; cd components<br>&gt; touch App.jsx<br>&gt; cd ../..</pre><p>So our file structure now looks like this:</p><pre>.<br>|-- client<br>     |-- components<br>         |-- App.jsx<br>     |-- index.html<br>     |-- index.js<br>|-- .babelrc<br>|-- package.json<br>|-- webpack.config.js<br>|-- yarn.lock</pre><p>While naming component files in React the convention is to use PascalCase thats why our file name starts with a capitalized letter.The extension could be either .jsx or .js, I find it better to explicitly use the .jsx extention on files that I intend to use JSX syntax.</p><p>Next let’s update the App.jsx file:</p><pre>/*<br>    ./client/components/App.jsx<br>*/<br>import React from &#39;react&#39;;<br><br>export default class App extends React.Component {<br>  render() {<br>    return (<br>     &lt;div style={{textAlign: &#39;center&#39;}}&gt;<br>        &lt;h1&gt;Hello World&lt;/h1&gt;<br>      &lt;/div&gt;);<br>  }<br>}</pre><p>Lastly, we render our component from our start file, index.js. Let&#39;s replace the console.log() with:</p><pre>/* <br>    ./client/index.js<br>*/<br>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;<br>import App from &#39;./components/App.jsx&#39;;<br><br>ReactDOM.render(&lt;App /&gt;, document.getElementById(&#39;root&#39;));</pre><p>Open bash and start our project. Make sure your terminal reads that you are on the project root folder.</p><pre>&gt; yarn start</pre><h3><a href="https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel#toc-conclusion">Conclusion</a></h3><p>We now have a working React Environment set-up. I hope that this tutorial shed some light on what the configurations really do and why we need them. Also, if the set-up is a bit too tasking to do on every project you can always fork my <a href="https://github.com/andela-jwarugu/react-startpack">repo</a>and have a base to start from.</p><p>Please feel free to experiment around with different webpack configurations and hit me up with any cool things you’ve discovered on the comment section.</p><p>Finally, you can and should try build up a more in depth React Project after the tutorial. Cheers!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*lK8OxSmJ08dzbHPzvNXVdA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12e1583df950" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 5 Text Editors to Facilitate Working in Laravel Framework]]></title>
            <link>https://medium.com/@sujalpatel022/5-best-text-editors-to-facilitate-working-in-laravel-framework-b040656f5a80?source=rss-8b176db03c8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b040656f5a80</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ide]]></category>
            <category><![CDATA[editor]]></category>
            <category><![CDATA[laravel-5]]></category>
            <dc:creator><![CDATA[Sujal Patel]]></dc:creator>
            <pubDate>Sun, 03 Sep 2017 10:47:59 GMT</pubDate>
            <atom:updated>2019-06-12T06:07:47.601Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*_xMu07aOp6-LO6jRUrMe_g.jpeg" /></figure><p>Laravel is one of the most popular frameworks for PHP projects and over a period of time it has proven its mettle. The simplicity, ease, efficiency and versatility offered by this open source php freedom have endeared it to a number of php programmers. However, to use this framework you need text editor. As text editor plays a key role in the entire process of coding, it is important to know some of the best code editors for Laravel</p><p><a href="https://www.jetbrains.com/phpstorm/download/#section=windows"><strong>PHP storm</strong></a></p><p>Download : <a href="https://www.jetbrains.com/phpstorm/download/#section=windows">https://www.jetbrains.com/phpstorm/download/#section=windows</a></p><p>PHP storm is trusted by many programmers to be the ultimate editor to work with Laravel framework as it offers a wholesome package of simplicity, versatility, efficiency and scalability. frameworks including (but not at all limited to) popular names like Zend Framework, Magento, <a href="https://www.cmswebsiteservices.com/drupal-website-development">Drupal</a>, WordPress, Symfony Joomla! And, of course, Laravel! Needless to say it is just a fraction of the entire list! PHP storm is specifically designed to learn the code at the deep level. Thus it can understand the comprehensive structure of every PHP framework and can work equally well across a various PHP project types. It offers the finest programming solution as it can excellently manage various coding jobs including strong code completion, refactoring and instant error deterrence. PHP Storm is fully compatible with PHP and works hassle-free with Databases or SQL. It comes with a complete collection of useful WebStorm features allowing it to work smoothly.</p><p><strong>Sublime Text</strong></p><p>Download : <a href="https://www.sublimetext.com/download">https://www.sublimetext.com/download</a></p><p>Simplicity is the major advantage offered by Sublime Text. Complexity makes a programmers’ life difficult and the repetitive processes further increase the chances of human error. So, Sublime text is specifically structured to facilitate code writing. It takes extensibility to the next level and also allows you to download its evaluation version from its company website. You need to first install the package control. Then enable it in Sublime Text. The download and installation process is quite simple.</p><p><strong>Netbeans</strong></p><p>Download : <a href="https://netbeans.org/downloads/">https://netbeans.org/downloads/</a></p><p>Coding is the backbone of any programming language. However, writing codes is no fun and even the most experienced programmers are prone to mistakes. A single mistake can ruin the entire efforts as it is difficult to locate the error in many cases and one may need to change subsequent codes too while rectifying the error. That’s why Netbeans is loaded with a variety of marking, formatting and highlighting tools that makes tracking easier like semantic and syntactic code highlighting, code folding and formatting. It also offers other excellent features for various phases of php project. A special mention goes to code folding, Laravel documentation (popup), occurrences and exit points marking and smart method prefiling parameter. Other features include pop-up Laravel documentation, rectangular selection, and smart catch or try code completion.</p><p><strong>Atom</strong></p><p>Download : <a href="https://atom.io/">https://atom.io/</a></p><p>Seamless Integration and extreme customization are 2 major almost every programmer aspires for. Atom is nearly perfect PHP IDE that can easily be installed. It is simple to use even for novice programmers. It is a brainchild of GitHub that enjoys an undisputable reputation in the industry. This open source IDE comes with a versatile collection of plugging offering it added functionality. Just a single plug-in installment is required to use it with Laravel framework. Laravel 5 snippets would be added automatically upon installing this plug-in. It requires medium resource usage and is ideal for the busy programmers are looking to eliminate the unnecessary complexity from their programming schedule.</p><p><strong>CodeLobster</strong></p><p>Download : <a href="http://www.codelobster.com/download.html">http://www.codelobster.com/download.html</a></p><p>Every coding programmer dreams of streamlining tasks so that he should not have to involve himself manually at micro-level. If you are also among them then Codelobster is the perfect IE for you. It streamlines the development route of your PHP projects thus saving you from remembering intricate details like arguments, attributes, tags and function names. Its auto complete features allow Codelobster to implement all these details on its own. Apart from PHP these features also supports CSS, HTML and JavaScript. It offers Help Control option that can also be accessed through keyboard by pressing F1 key.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b040656f5a80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install SSL Certificate for Free — Let’s Encrypt installation without coding]]></title>
            <link>https://medium.com/@sujalpatel022/install-ssl-certificate-for-free-lets-encrypt-installation-without-coding-9156b500a615?source=rss-8b176db03c8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9156b500a615</guid>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[godaddy]]></category>
            <category><![CDATA[free]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <dc:creator><![CDATA[Sujal Patel]]></dc:creator>
            <pubDate>Sat, 05 Aug 2017 08:28:58 GMT</pubDate>
            <atom:updated>2019-06-12T06:08:07.193Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*vJ4P5kZVCufcILGhRyTA2g.jpeg" /></figure><p>let’s encrypt totally free but you do need to update it every 90 Days so basically you have to do the same process every 90 days.</p><p>you can install let’s encrypt in few ways are we going to use an online tool for simplicity especially if you’re not like coding.</p><p><strong>Step-1</strong><br>Go to <a href="https://zerossl.com/">zerossl.com</a> and click online certificate and tools and start the free SSL certificate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rPiGi4wC7KtT9Lq96qdGlA.png" /></figure><p>and once it’s loaded you’ll see below image screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rankdfjwl8H7hNvldTeSsw.png" /></figure><p><strong>Step-2</strong><br>Add your domain name with and without www like <strong>example.com</strong> and <a href="http://www.example.com/"><strong>www.example.com</strong></a> and check the check box here then hit the next button. show in below screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wba_tAm2olU3KwikMGqTjg.png" /></figure><p>it will start generating at CSR. this might take a minute or so just wait it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xU3R_8QD5SH1eofcWudzoA.png" /></figure><p>Once it’s done hit the download button so you have a backup of this file and then you can just hit next button again and it will generating account key again this might take minute or two and once it’s done click on download button as a backup and you can hit next button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PejVeb8GNMD5m-siR2INXw.png" /></figure><p>In next step, you will be verifying that you are owning this domain by placing these files on to your server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XlOzl-FsHOjRdslIA48w0g.png" /></figure><p>it’s actually quite easy just download the file and then you have to go to the cPanel in my case I’m using <strong>GoDaddy.com</strong>. you should have the similar setup for other web hosting provider so your cPanel navigate to <strong>File Manager</strong> and go to your root and the important thing here is to <strong>create a folder under your public_html called .well-known</strong> so it’ll create here and the inside of that folder <strong>create another folder acme-challenge</strong> once that’s created just go inside of it and then upload those two files we just downloaded.</p><p>Note: Folder name should be same as above defined.</p><p><strong>Show Steps to the explain above description.<br>1. Go to the File Manager<br>2. Create New Folder name is .well-knows inside the File Manager</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPqTgb3WfEZuGbppbBcZXA.png" /></figure><p><strong>3. Go inside the .well-knows folder and create another folder name is acme-challenge</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hC71hmplj8qWCmD7xUGTVQ.png" /></figure><p><strong>4. Upload last two downloaded file inside the acme-challenge Folder.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjbczU6lQdk2ynqYn_BGtg.png" /></figure><p>Alright and now you should see a new folder the two files.</p><p>And you can test that this works by clicking on the link in <a href="https://zerossl.com/">zerossl.com</a> show in below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7WpHKagjfAF9J5-9jlE4NA.png" /></figure><p>and it returns you the keys that mean it’s installed correctly and you can hit next and it will verify that everything is right and if everything went well you’ll see that your certificate is ready so if you scroll down you’ll see the two forms just create on download so that you have the backups.</p><p><strong>Step-3</strong><br>All right now you go back to your cPanel and if you scroll down and find <strong>SSL/TLS</strong> under security section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mjeA3MHB253KH7M-s3LA7w.png" /></figure><p>Hit on that and in GoDaddy, you have to find here at the bottom <strong>installing managers</strong>.<br>Hit on <strong>manage SSL </strong>and here you’ll be select your domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeIIsHtbIxrXqC4EKPsZBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8x2FzIFr-lNFGmolVcpGgw.png" /></figure><p>for other field go back to the <a href="https://zerossl.com/">zerossl.com</a> and we’ll grab the first key and copy paste in CRT Blank section.</p><p>Note: the first key has a two key first is <strong>CRT</strong> and another is <strong>Certificate Authority Bundle</strong> so carefully copy the key and paste <br>in the related section.</p><ol><li>The first key is CRT</li><li>Second Key is Certificate Authority Bundle: (CABUNDLE)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DwO2NM6DdotFOPtqQ3X8MQ.png" /></figure><p>And the <strong>private key</strong> you can grab it from zero SSL and you copy paste it in the middle section it says private key on the top so copy paste there</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2faVRp55oa-EyHMSkIcQYA.png" /></figure><p>After shows, green checks it means all is good just hit on install certificate and once it’s done your <strong>SSL </strong>certificate is installed and you can test it by going to your website and putting the <strong>HTTPS </strong>in front of it and you’ll see that you should have this secure lock in front of your domain name</p><p><strong>Step-4</strong><br>We want to automatically redirect all the traffic from HTTP to HTTPS.<br>go back to your cPanel File Manager and there if go to your root so your <strong>public_html</strong> and create a new file called <strong>.htaccess</strong>.</p><p>Opened and added below code.</p><p>RewriteEngine On<br>RewriteCond %{HTTPS} off<br>RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]</p><p>then save the file and now if you refresh it automatically redirects you all time to the HTTPS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9156b500a615" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>