
<?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 5 Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/laravel-5/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.technig.com/tag/laravel-5/</link>
	<description>Gateway for IT Experts and Tech Geeks</description>
	<lastBuildDate>Sun, 02 Jun 2019 23:06:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.technig.com/wp-content/uploads/2020/04/32x32.png</url>
	<title>Laravel 5 Archives - TECHNIG</title>
	<link>https://www.technig.com/tag/laravel-5/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">162720667</site>	<item>
		<title>Top 5  Best Laravel Admin Template Packages</title>
		<link>https://www.technig.com/best-laravel-admin-template-packages/</link>
					<comments>https://www.technig.com/best-laravel-admin-template-packages/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Thu, 28 Sep 2017 05:30:45 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel 5 Packages]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Developer]]></category>
		<category><![CDATA[PHP framework]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Application Developer]]></category>
		<category><![CDATA[WordPress Developer]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=11368</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="420" src="https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Top 5 Best Laravel Admin Template Packages" decoding="async" fetchpriority="high" srcset="https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages.jpg 840w, https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages-300x150.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages-768x384.jpg 768w" sizes="(max-width: 840px) 100vw, 840px" /></div>
<p>Laravel 5 is the most popular PHP frameworks nowadays. There is no doubt about it. So, if you want to develop fast, painless, and secure applications with PHP, than Laravel, is the number one choice. Besides, Laravel has a very active community of expert developers. It means you can easily find the solutions to every [&#8230;]</p>
<p>The post <a href="https://www.technig.com/best-laravel-admin-template-packages/">Top 5  Best Laravel Admin Template Packages</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="420" src="https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Top 5 Best Laravel Admin Template Packages" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages.jpg 840w, https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages-300x150.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/Top-5-Best-Laravel-Admin-Template-Packages-768x384.jpg 768w" sizes="(max-width: 840px) 100vw, 840px" /></div><p>Laravel 5 is the most popular PHP frameworks nowadays. There is no doubt about it. So, if you want to develop fast, painless, and secure applications with PHP, than Laravel, is the number one choice. Besides, Laravel has a very active community of expert developers. It means you can easily find the solutions to every problem. Considering this, We have collected the top 5 best Laravel admin template packages. These packages help you make your next PHP applications in the matter of one hour. Yes, they are such powerful tools.</p>
<h2>Best Laravel Admin Template Packages</h2>
<p>Below are the lists of top 5 best Laravel admin template packages.</p>
<ol>
<li>Laravel Voyager</li>
<li>LaraAdmin</li>
<li>AdminLTE Laravel</li>
<li>Laravel AdminLTE</li>
<li>Laravel Panel</li>
</ol>
<p>So, The list is base on features and popularity among developers.</p>
<h2>1. Laravel Voyager</h2>
<figure id="attachment_11383" aria-describedby="caption-attachment-11383" style="width: 549px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/hero-app.png"><img decoding="async" class="wp-image-11383" src="http://3.90.216.52/wp-content/uploads/2017/09/hero-app.png" alt="Laravel Voyager - Best Laravel Admin Template Packages" width="549" height="275" srcset="https://www.technig.com/wp-content/uploads/2017/09/hero-app.png 840w, https://www.technig.com/wp-content/uploads/2017/09/hero-app-300x150.png 300w, https://www.technig.com/wp-content/uploads/2017/09/hero-app-768x384.png 768w" sizes="(max-width: 549px) 100vw, 549px" /></a><figcaption id="caption-attachment-11383" class="wp-caption-text">Laravel Voyager &#8211; Best Laravel Admin Template Packages</figcaption></figure>
<p>In one sentence I should say that Laravel Voyager is insanely fantastic. Also, this package worth paying yet it&#8217;s free, and you can use it for free. Besides, the Features are appealing. Voyager will take care of your administrative tasks, this way you can focus on what you do best, which is building the next amazing app. So, you can learn more about its features and functionality in the <a href="https://laravelvoyager.com/docs">documentation.</a></p>
<h2>2. LaraAdmin</h2>
<figure id="attachment_11385" aria-describedby="caption-attachment-11385" style="width: 492px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/LaraAdmin-Laravel-Admin-Package.png"><img decoding="async" class="wp-image-11385" src="http://3.90.216.52/wp-content/uploads/2017/09/LaraAdmin-Laravel-Admin-Package.png" alt="LaraAdmin - Laravel Admin Package" width="492" height="270" srcset="https://www.technig.com/wp-content/uploads/2017/09/LaraAdmin-Laravel-Admin-Package.png 800w, https://www.technig.com/wp-content/uploads/2017/09/LaraAdmin-Laravel-Admin-Package-300x165.png 300w, https://www.technig.com/wp-content/uploads/2017/09/LaraAdmin-Laravel-Admin-Package-768x421.png 768w" sizes="(max-width: 492px) 100vw, 492px" /></a><figcaption id="caption-attachment-11385" class="wp-caption-text">LaraAdmin &#8211; Laravel Admin Package</figcaption></figure>
<p>The number second, a straightforward and fast way to built Admin Panel in Laravel as well as a CRM. It&#8217;s almost similar to Voyager, but with fewer features. So, LaraAdmin controls your Models, Data and their Role Permissions with no coding at all. Also, it is giving you the state of an art focus towards Data representation than Data Handling.</p>
<h2>3. AdminLTE Laravel</h2>
<figure id="attachment_11386" aria-describedby="caption-attachment-11386" style="width: 496px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/AdminLTE-Laravel-Laravel-Admin-Template.png"><img loading="lazy" decoding="async" class="wp-image-11386" src="http://3.90.216.52/wp-content/uploads/2017/09/AdminLTE-Laravel-Laravel-Admin-Template.png" alt="AdminLTE Laravel - Laravel Admin Template" width="496" height="295" srcset="https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Laravel-Laravel-Admin-Template.png 1191w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Laravel-Laravel-Admin-Template-300x178.png 300w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Laravel-Laravel-Admin-Template-768x457.png 768w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Laravel-Laravel-Admin-Template-1024x609.png 1024w" sizes="(max-width: 496px) 100vw, 496px" /></a><figcaption id="caption-attachment-11386" class="wp-caption-text">AdminLTE Laravel &#8211; Laravel Admin Template</figcaption></figure>
<p>We have already covered how to integrate AdminLTE into <a href="https://www.technig.com/tag/laravel/" rel="noopener">Laravel 5</a> projects. But, if you are looking for a package or pre-configured way, this package is your best choice. Though it&#8217;s not like a package, you can use it the same as a package. So, It switches default Laravel scaffolding/boilerplate to the AdminLTE template and Pratt Landing Page with Bootstrap 3.0.</p>
<h2>4. Laravel AdminLTE</h2>
<figure id="attachment_11387" aria-describedby="caption-attachment-11387" style="width: 514px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/AdminLTE-for-Laravel.png"><img loading="lazy" decoding="async" class="wp-image-11387" src="http://3.90.216.52/wp-content/uploads/2017/09/AdminLTE-for-Laravel.png" alt="AdminLTE for Laravel" width="514" height="312" srcset="https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-for-Laravel.png 897w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-for-Laravel-300x182.png 300w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-for-Laravel-768x466.png 768w" sizes="(max-width: 514px) 100vw, 514px" /></a><figcaption id="caption-attachment-11387" class="wp-caption-text">AdminLTE for Laravel</figcaption></figure>
<p>Now, here is the real package for AdminLTE and Laravel. This package provides an easy way to set up AdminLTE with Laravel 5 quickly. It has no requirements and dependencies besides Laravel, so you can start building your admin panel immediately. The package just provides a Blade template that you can extend and advanced menu configuration possibilities. So, a replacement for the<span style="background-color: #ededed;"><em> make: auth</em></span> Artisan command that uses AdminLTE styled views instead of the default Laravel ones are also included.</p>
<h2>5. Laravel Panel</h2>
<figure id="attachment_11388" aria-describedby="caption-attachment-11388" style="width: 586px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/Laravel-Panel-Laravel-Admin-Package.jpg"><img loading="lazy" decoding="async" class="wp-image-11388" src="http://3.90.216.52/wp-content/uploads/2017/09/Laravel-Panel-Laravel-Admin-Package.jpg" alt="Laravel Panel - Laravel Admin Package" width="586" height="328" srcset="https://www.technig.com/wp-content/uploads/2017/09/Laravel-Panel-Laravel-Admin-Package.jpg 800w, https://www.technig.com/wp-content/uploads/2017/09/Laravel-Panel-Laravel-Admin-Package-300x168.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/Laravel-Panel-Laravel-Admin-Package-768x430.jpg 768w" sizes="(max-width: 586px) 100vw, 586px" /></a><figcaption id="caption-attachment-11388" class="wp-caption-text">Laravel Panel &#8211; Laravel Admin Package</figcaption></figure>
<p>The last but not least. The LaravelPanel lets you create a simple CRUD (create, read, update and delete) by just one command. Alos, it offers various field types such as text, select box, checkbox, text editor, DateTime, image, autocomplete, tag, colour picker and more.</p>
<h2>Conclusion</h2>
<p>We come to an end. Many other packages can choose. But honestly, the above list is just amazing ones. They are free, fast, and secure. Besides, you can find some paid packages as well, but those packages can&#8217;t-do more than these. So, we hope this article has been informative for you. If you have any questions, feel free to comment it below.</p>
<p>The post <a href="https://www.technig.com/best-laravel-admin-template-packages/">Top 5  Best Laravel Admin Template Packages</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/best-laravel-admin-template-packages/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11368</post-id>	</item>
		<item>
		<title>How to Integrate AdminLTE to Laravel 5 with NPM</title>
		<link>https://www.technig.com/adminlte-plus-laravel-5-integration/</link>
					<comments>https://www.technig.com/adminlte-plus-laravel-5-integration/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 26 Sep 2017 09:30:26 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP framework]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=11233</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="414" src="https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM-.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="AdminLTE Plus Laravel 5 Integration with NPM" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM-.jpg 840w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM--300x148.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM--768x379.jpg 768w" sizes="(max-width: 840px) 100vw, 840px" /></div>
<p>Laravel is not only an appealing PHP framework, but it has made the community of PHP larger. Developing any SAAS or web application with this framework is easy and flawless. So, as a web developer or PHP developer, you must learn this framework. In this article, we will show you how to integrate a free admin [&#8230;]</p>
<p>The post <a href="https://www.technig.com/adminlte-plus-laravel-5-integration/">How to Integrate AdminLTE to Laravel 5 with NPM</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="840" height="414" src="https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM-.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="AdminLTE Plus Laravel 5 Integration with NPM" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM-.jpg 840w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM--300x148.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/AdminLTE-Plus-Laravel-5-Integration-with-NPM--768x379.jpg 768w" sizes="(max-width: 840px) 100vw, 840px" /></div><p>Laravel is not only an appealing PHP framework, but it has made the community of PHP larger. Developing any SAAS or web application with this framework is easy and flawless. So, as a web developer or PHP developer, you must learn this framework. In this article, we will show you how to integrate a free admin Template with Laravel framework step by step. You will learn AdminLTE plus Laravel 5 integration.</p>
<h2>AdminLTE plus Laravel 5 Integration</h2>
<p>If you are new to Laravel, we recommend you to read our other tutorials about <a href="https://www.technig.com/tag/laravel-5/">Laravel </a>first then continue this article. So, we assume you know the basics.</p>
<blockquote><p>You should know that we are not using any Laravel Packages for this integration. Though there are some Packages that you can install and everything is setup, we show you how you can use npm to install AdminLTE independently.</p></blockquote>
<h2>1. Install a Fresh Laravel 5.5</h2>
<p>We will start with a fresh Laravel project so that you can see follow along without any issue.</p>
<pre class="lang:default decode:true">Laravel new Admin</pre>
<p>Or use composer to install.</p>
<pre class="lang:default decode:true">composer create-project --prefer-dist laravel/laravel Admin
</pre>
<h2>2. Install NPM Packages</h2>
<p>Now, you should install npm packages. Run the following command in your project directory.</p>
<pre class="lang:default decode:true">npm install</pre>
<p>By default, it will install the following packages.</p>
<pre class="lang:default decode:true">  "devDependencies": {
    "axios": "^0.16.2",
    "bootstrap-sass": "^3.3.7",
    "cross-env": "^5.0.1",
    "jquery": "^3.1.1",
    "laravel-mix": "^1.0",
    "lodash": "^4.17.4",
    "vue": "^2.1.10"
  }</pre>
<p>Of course, you can remove any of them if you want from the package.json file.</p>
<h2>3. Install AdminLTE with NPM</h2>
<figure id="attachment_11235" aria-describedby="caption-attachment-11235" style="width: 519px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2017/09/adminlte-Free-Premium-Admin-Template.png"><img loading="lazy" decoding="async" class="wp-image-11235" src="http://3.90.216.52/wp-content/uploads/2017/09/adminlte-Free-Premium-Admin-Template.png" alt="adminlte - Free Premium Admin Template" width="519" height="256" srcset="https://www.technig.com/wp-content/uploads/2017/09/adminlte-Free-Premium-Admin-Template.png 750w, https://www.technig.com/wp-content/uploads/2017/09/adminlte-Free-Premium-Admin-Template-300x148.png 300w" sizes="(max-width: 519px) 100vw, 519px" /></a><figcaption id="caption-attachment-11235" class="wp-caption-text">AdminLTE &#8211; Free Premium Admin Template</figcaption></figure>
<p>As mentioned, AdminLTE is free and open-source. You can download directly from its website or use npm.</p>
<pre class="lang:default decode:true">npm install admin-lte --save-dev
</pre>
<h2>4. Configure CSS and JavaScript Files</h2>
<p>Time to configure CSS and JavaScript files. So, you know that you can configure asset files in resources/assets directory.</p>
<h3>Config CSS Files</h3>
<p>Open your app.scss file which is in sass folder then add the following line of code at the end.</p>
<pre class="lang:default decode:true">// import admin lte css

@import "~admin-lte/dist/css/adminLTE.css";
@import "~admin-lte/dist/css/skins/_all-skins.css";</pre>
<p>It&#8217;s the reference to AdminLTE CSS and skin colours. ( Those files are in node_modules folder )</p>
<h3>JavaScript File</h3>
<p>Open your bootstrap.js file that&#8217;s located in the js folder. Now add the following line of code <strong>after</strong> try and catch block.</p>
<pre class="lang:default decode:true">// AdminLTE code here. 
require('admin-lte');</pre>
<p>It will add the essential JavaScript files.</p>
<h2>5. Compile Files</h2>
<p>So far you are done and you can use any component of AdminLTE in your project. But you must compile those file before.</p>
<pre class="lang:default decode:true">npm run production</pre>
<p>The above command will compile and minify the CSS and JavaScript files to the public directory.</p>
<h2>6. Make a Master Page.</h2>
<p>You can create a master page in the resources/view/layouts directory. Then paste the code from the AdminLTE blank.html to the master page. Now, Remove all the links to CSS files from the header and the same JavaScript files from the footer.</p>
<p>Now just give a link to app.css in the header and a script link to app.js in the footer.</p>
<pre class="lang:default decode:true">&lt;!-- should be added into the header --&gt;
&lt;link rel="stylesheet" href="{{asset('css/app.css')}}"&gt;

&lt;!-- should be added into the footer before body tag ends --&gt;
http : // asset('js/app.js')


</pre>
<p>If you use this master template now, everything should work except the toggle menu. We will fixe it in the next step.</p>
<h2>7. Debug and Fix Problems</h2>
<p>So, the toggle menu is not working. To fix it, just add the following code in your app.js which is located in resources/assets/js/app.js</p>
<pre class="theme:sublime-text lang:js decode:true">// add custom js 

$('.sidebar-toggle').on('click',function(){

           var cls =  $('body').hasClass('sidebar-collapse');
           if(cls == true){
                $('body').removeClass('sidebar-collapse');
           } else {
                $('body').addClass('sidebar-collapse');
           }

});</pre>
<p>Finally, recompile the file. ( step 5 )</p>
<h2>Conclusion</h2>
<p>So, it was AdminLTE plus Laravel 5 integration with NPM. We hope this article has been informative for you. If you have any questions or any problem during integration, feel free to ask below.</p>
<p>The post <a href="https://www.technig.com/adminlte-plus-laravel-5-integration/">How to Integrate AdminLTE to Laravel 5 with NPM</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/adminlte-plus-laravel-5-integration/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">11233</post-id>	</item>
		<item>
		<title>Configure Laravel 5.5 with Bootstrap 4</title>
		<link>https://www.technig.com/configure-laravel-5-5-with-bootstrap-4/</link>
					<comments>https://www.technig.com/configure-laravel-5-5-with-bootstrap-4/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Sat, 09 Sep 2017 09:30:11 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS Frameworks]]></category>
		<category><![CDATA[CSS Solution]]></category>
		<category><![CDATA[CSS Tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[laravel tutorial]]></category>
		<category><![CDATA[PHP framework]]></category>
		<category><![CDATA[twitter bootstrap]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=10448</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="640" height="480" src="https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="how to configure laravel 5 5 with bootstrap 4" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4.jpg 640w, https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4-300x225.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4-86x64.jpg 86w" sizes="(max-width: 640px) 100vw, 640px" /></div>
<p>Finally, Bootstrap 4 has come with a lot of amazing features.  Meanwhile, Laravel 5.5 with LTS version has also released. Laravel 5.5 by default comes with bootstrap version 3. In this article, you will learn how to configure Laravel 5 5 with Bootstrap 4 step by step. Configure Laravel 5 5 with Bootstrap 4 Step [&#8230;]</p>
<p>The post <a href="https://www.technig.com/configure-laravel-5-5-with-bootstrap-4/">Configure Laravel 5.5 with Bootstrap 4</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="640" height="480" src="https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="how to configure laravel 5 5 with bootstrap 4" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4.jpg 640w, https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4-300x225.jpg 300w, https://www.technig.com/wp-content/uploads/2017/09/how-to-configure-laravel-5.5-with-bootstrap-4-86x64.jpg 86w" sizes="(max-width: 640px) 100vw, 640px" /></div><p>Finally, <a href="http://getbootstrap.com/" rel="noopener">Bootstrap 4</a> has come with a lot of amazing features.  Meanwhile, Laravel 5.5 with LTS version has also released. Laravel 5.5 by default comes with bootstrap version 3. In this article, you will learn how to configure Laravel 5 5 with Bootstrap 4 step by step.</p>
<h2>Configure Laravel 5 5 with Bootstrap 4</h2>
<p><strong>Step 1. </strong>Create a new Laravel project. You can use Laravel install or composer installer. If you have any trouble with installation or configuration of Laravel, We recommend you to read our<a href="https://www.technig.com/install-laravel-5-using-laravel-installer/"> Laravel tutorials</a> first.</p>
<pre class="lang:php decode:true">laravel new App</pre>
<p><strong>Step 2. </strong>Now let&#8217;s install bootstrap 4 and npm dependencies. By default, Laravel will download bootstrap 3. You can find it in your package.json file.</p>
<figure id="attachment_10454" aria-describedby="caption-attachment-10454" style="width: 611px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/npm-packages-for-laravel-5.5.png"><img loading="lazy" decoding="async" class="wp-image-10454" src="http://3.90.216.52/wp-content/uploads/2017/09/npm-packages-for-laravel-5.5.png" alt="npm packages for laravel 5.5" width="611" height="329" srcset="https://www.technig.com/wp-content/uploads/2017/09/npm-packages-for-laravel-5.5.png 957w, https://www.technig.com/wp-content/uploads/2017/09/npm-packages-for-laravel-5.5-300x162.png 300w, https://www.technig.com/wp-content/uploads/2017/09/npm-packages-for-laravel-5.5-768x414.png 768w" sizes="(max-width: 611px) 100vw, 611px" /></a><figcaption id="caption-attachment-10454" class="wp-caption-text">npm packages for Laravel 5.5</figcaption></figure>
<p>Open your cmd or terminal and run the<span style="background-color: #d6d6d6;"><em> npm install</em> </span>command to install the above dependencies. Make sure you are in the application directory.</p>
<figure id="attachment_10455" aria-describedby="caption-attachment-10455" style="width: 633px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/npm-install-command.png"><img loading="lazy" decoding="async" class="wp-image-10455" src="http://3.90.216.52/wp-content/uploads/2017/09/npm-install-command.png" alt="npm install command" width="633" height="146" srcset="https://www.technig.com/wp-content/uploads/2017/09/npm-install-command.png 893w, https://www.technig.com/wp-content/uploads/2017/09/npm-install-command-300x69.png 300w, https://www.technig.com/wp-content/uploads/2017/09/npm-install-command-768x177.png 768w" sizes="(max-width: 633px) 100vw, 633px" /></a><figcaption id="caption-attachment-10455" class="wp-caption-text">npm install command</figcaption></figure>
<p><strong>Step 3. </strong>Once npm dependencies installed successfully, let&#8217;s install bootstrap 4. Run the following command.</p>
<pre class="lang:sh decode:true">npm install bootstrap@4.0.0-beta</pre>
<p>It will install bootstrap 4 beta version. Now inside your node_moduls folder, you have two folders for bootstrap files.</p>
<figure id="attachment_10456" aria-describedby="caption-attachment-10456" style="width: 467px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/bootstap-4-and-3-directories.png"><img loading="lazy" decoding="async" class="size-full wp-image-10456" src="http://3.90.216.52/wp-content/uploads/2017/09/bootstap-4-and-3-directories.png" alt="bootstrap 4 and 3 directories" width="467" height="135" srcset="https://www.technig.com/wp-content/uploads/2017/09/bootstap-4-and-3-directories.png 467w, https://www.technig.com/wp-content/uploads/2017/09/bootstap-4-and-3-directories-300x87.png 300w" sizes="(max-width: 467px) 100vw, 467px" /></a><figcaption id="caption-attachment-10456" class="wp-caption-text">Bootstrap 4 and 3 directories</figcaption></figure>
<p>The first one is bootstrap 4 files.</p>
<p><strong>Step 4. </strong>It&#8217;s time to configure the CSS and JavaScript files. You can set all of this configuration in the<em><span style="background-color: #cfcfcf;"> resources/assets</span> </em>directory.</p>
<p>First, let&#8217;s see what changes we can bring to CSS files. Open the sass/app.scss. You file must look like this.</p>
<pre class="theme:sublime-text lang:css decode:true">// Fonts
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");

// Variables
@import "variables";

// Bootstrap
@import "~bootstrap-sass/assets/stylesheets/bootstrap";
</pre>
<p>It&#8217;s importing fonts, variables from _variables.scss and bootstrap 3 from node_modules. Now we must point the bootstrap to version 4. You can do it like this.</p>
<pre class="theme:sublime-text lang:css decode:true">// Bootstrap
@import "node_modules/bootstrap/scss/bootstrap";
</pre>
<p>The last changes for CSS files are to open _variables.scss file and change the px values to rem. It&#8217;s because bootstrap 4 is not supporting px value anymore.</p>
<figure id="attachment_10458" aria-describedby="caption-attachment-10458" style="width: 636px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/bootstrap-px-to-rem.png"><img loading="lazy" decoding="async" class="size-full wp-image-10458" src="http://3.90.216.52/wp-content/uploads/2017/09/bootstrap-px-to-rem.png" alt="bootstrap px to rem" width="636" height="134" srcset="https://www.technig.com/wp-content/uploads/2017/09/bootstrap-px-to-rem.png 636w, https://www.technig.com/wp-content/uploads/2017/09/bootstrap-px-to-rem-300x63.png 300w" sizes="(max-width: 636px) 100vw, 636px" /></a><figcaption id="caption-attachment-10458" class="wp-caption-text">Bootstrap px to rem</figcaption></figure>
<p>Now open your js/bootstrap.js file.</p>
<figure id="attachment_10459" aria-describedby="caption-attachment-10459" style="width: 586px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/bootstrap-4-and-laravel-files.png"><img loading="lazy" decoding="async" class="wp-image-10459" src="http://3.90.216.52/wp-content/uploads/2017/09/bootstrap-4-and-laravel-files.png" alt="bootstrap 4 and laravel files" width="586" height="254" srcset="https://www.technig.com/wp-content/uploads/2017/09/bootstrap-4-and-laravel-files.png 873w, https://www.technig.com/wp-content/uploads/2017/09/bootstrap-4-and-laravel-files-300x130.png 300w, https://www.technig.com/wp-content/uploads/2017/09/bootstrap-4-and-laravel-files-768x333.png 768w" sizes="(max-width: 586px) 100vw, 586px" /></a><figcaption id="caption-attachment-10459" class="wp-caption-text">Bootstrap 4 and Laravel files</figcaption></figure>
<p>Just change the bootstrap-sass to bootstrap.</p>
<pre class="theme:sublime-text lang:default decode:true"> require('bootstrap');</pre>
<p>Now you are done.</p>
<p><strong>Step 5. </strong>Open your cmd again and run the following command to compile down the bootstrap 4 files successfully.</p>
<pre class="lang:default decode:true">npm run production</pre>
<p>It will compile down all the JavaScript and CSS files to public/CSS and js directory.</p>
<p>Here is the list of other commands. Th production command will minify the code as well.</p>
<figure id="attachment_10460" aria-describedby="caption-attachment-10460" style="width: 614px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/09/npm-command-list.png"><img loading="lazy" decoding="async" class="wp-image-10460" src="http://3.90.216.52/wp-content/uploads/2017/09/npm-command-list.png" alt="npm command list" width="614" height="186" srcset="https://www.technig.com/wp-content/uploads/2017/09/npm-command-list.png 956w, https://www.technig.com/wp-content/uploads/2017/09/npm-command-list-300x91.png 300w, https://www.technig.com/wp-content/uploads/2017/09/npm-command-list-768x233.png 768w" sizes="(max-width: 614px) 100vw, 614px" /></a><figcaption id="caption-attachment-10460" class="wp-caption-text">npm command list</figcaption></figure>
<p>Now you have configured Laravel 5 5 with bootstrap 4. If you view your Laravel app, everything is broken. It&#8217;s because bootstrap team rewrote the bootstrap 4. Everything has changed. Read the <a href="http://getbootstrap.com">documentation </a>to see what has changed.</p>
<h2>Conclusion</h2>
<p>Bootstrap 4 browser support is not very good. For Internet Explorer version, it should be 10+, and other browsers with the latest version will be supported. If you have any issue, feel free to comment it below.</p>
<p>The post <a href="https://www.technig.com/configure-laravel-5-5-with-bootstrap-4/">Configure Laravel 5.5 with Bootstrap 4</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/configure-laravel-5-5-with-bootstrap-4/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">10448</post-id>	</item>
		<item>
		<title>Top 5 Laravel 5 Messaging Packages You Must Know</title>
		<link>https://www.technig.com/top-5-laravel-5-messaging-packages/</link>
					<comments>https://www.technig.com/top-5-laravel-5-messaging-packages/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Fri, 14 Apr 2017 04:48:11 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel 5 Packages]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=9628</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="754" height="512" src="https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Top 5 Laravel 5 Messaging Packages" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages.jpg 754w, https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-300x204.jpg 300w" sizes="(max-width: 754px) 100vw, 754px" /></div>
<p>Laravel is by far the most popular PHP framework in 2017. Developing web applications has never been this much easy. Package in Laravel saves a lot of time while developing complex applications. Meanwhile, packages are developed by expert developers and they are probably painless, secure and bug-free. In this article, we introduce the top 5 Laravel [&#8230;]</p>
<p>The post <a href="https://www.technig.com/top-5-laravel-5-messaging-packages/">Top 5 Laravel 5 Messaging Packages You Must Know</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="754" height="512" src="https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Top 5 Laravel 5 Messaging Packages" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages.jpg 754w, https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-300x204.jpg 300w" sizes="(max-width: 754px) 100vw, 754px" /></div><p>Laravel is by far the most popular PHP framework in 2017. Developing web applications has never been this much easy. Package in Laravel saves a lot of time while developing complex applications. Meanwhile, packages are developed by expert developers and they are probably painless, secure and bug-free. In this article, we introduce the top 5 Laravel 5 messaging Packages that will help you develop web apps in a matter of minutes.</p>
<h2>Top 5 Laravel 5 Messaging Packages list</h2>
<h3>01. <a href="https://github.com/nahid/talk">Laravel-Talk</a></h3>
<figure id="attachment_9634" aria-describedby="caption-attachment-9634" style="width: 416px" class="wp-caption aligncenter"><a href="http://3.90.216.52/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-Laravel-talk.png"><img loading="lazy" decoding="async" class=" wp-image-9634" src="http://3.90.216.52/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-Laravel-talk.png" alt="Top 5 Laravel 5 Messaging Packages - Laravel-talk" width="416" height="472" srcset="https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-Laravel-talk.png 1164w, https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-Laravel-talk-264x300.png 264w, https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-Laravel-talk-768x872.png 768w, https://www.technig.com/wp-content/uploads/2017/04/Top-5-Laravel-5-Messaging-Packages-Laravel-talk-902x1024.png 902w" sizes="(max-width: 416px) 100vw, 416px" /></a><figcaption id="caption-attachment-9634" class="wp-caption-text">Top 5 Laravel 5 Messaging Packages &#8211; Laravel-talk</figcaption></figure>
<p>Talk is a Laravel 5 based user conversation (inbox) system with real-time messaging. You can easily integrate this package with any Laravel based project. It helps you to develop a messaging system in just a few mins. Here is a project screenshot that was developed by Talk.</p>
<p>Talk v2.1.0 is supported real-time messaging. Learn more about Talk Live Messaging</p>
<p><strong>Credit: <a href="https://github.com/nahid">Nahid</a></strong></p>
<h3>02. <a href="https://github.com/cmgmyr/laravel-messenger">Laravel Messenger</a></h3>
<p>This package will allow you to add a full user messaging system into your Laravel application.</p>
<h2>Features</h2>
<ul>
<li>Multiple conversations per user</li>
<li>Optionally loop in additional users with each new message</li>
<li>View the last message for each thread available</li>
<li>Returns either all messages in the system, all messages associated with the user, or all message associated to the user with new/unread messages</li>
<li>Return the user&#8217;s unread message count easily</li>
<li>Very flexible usage so you can implement your own access control</li>
</ul>
<p><strong>Credit: <a href="https://github.com/cmgmyr">Chris Gmyr</a></strong></p>
<h3>03.<a href="https://github.com/SimpleSoftwareIO/simple-sms"> Simple SMS</a></h3>
<p>Simple SMS is easy to use package for <a href="http://laravel.com/">Laravel</a> that adds the capability to send and receive SMS/MMS messages to mobile phones from your web app. It currently supports a free way to send SMS messages through E-Mail gateways provided by the wireless carriers. The package also supports 9 paid services, Call Fire, EZTexting, FlowRoute, LabsMobile, Mozeo, Nexmo, Plivo, Twilio, Zenvia, and JustSend.</p>
<p><strong>Credit: <a href="https://github.com/SimplyCorey">Corey McCormick</a></strong></p>
<h3>04. <a href="https://github.com/toplan/laravel-sms">Laravel Sms</a></h3>
<p>A framework based on Laravel the powerful mobile phone number legitimacy verification solution.</p>
<p><code>laravel-sms</code>2.0 is based on toplan / phpsms developed for the framework of <code>Laravel</code>the mobile phone number verification solution. Compared to version 1.0, 2.0 is a version that is reconstructed using new ideas, and the upgrade standby agent mechanism is an agent equalization scheduling mechanism. <code>phpsms</code>To <code>laravel-sms</code>provide a full set of SMS sending mechanism, but <code>phpsms</code>also have their own service provider, that is to say, you can be in <code>Laravel</code>the framework of the independent use of barrier-free.<code>phpsms</code></p>
<p><strong>Credit: <a href="https://github.com/toplan">Ian tian peng</a></strong></p>
<h3>05. <a href="https://github.com/ElfSundae/Laravel-BearyChat">BearyChat for Laravel</a></h3>
<div class="js-repo-meta-container">
<div class="repository-meta mb-0 mb-3 js-repo-meta-edit js-details-container">
<div class="repository-meta-content col-11 mb-1">A Laravel integration for the BearyChat package to send robot messages to the BearyChat. This package is compatible with Laravel 5, Laravel 4 and Lumen.</div>
</div>
</div>
<div class="repository-meta-content col-11 mb-1"></div>
<div class="repository-meta-content col-11 mb-1"><strong>Credit: <a href="https://github.com/ElfSundae">Elf Sundae</a></strong></div>
<div class="repository-meta-content col-11 mb-1"></div>
<h2>Conclusion</h2>
<p>It was the top 5 Laravel 5 messaging packages. We hope it helps you create and amazing applications. If you know any better packages, feel free to share with us on the comment bellow. 🙂</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.technig.com/top-5-laravel-5-messaging-packages/">Top 5 Laravel 5 Messaging Packages You Must Know</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/top-5-laravel-5-messaging-packages/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9628</post-id>	</item>
		<item>
		<title>How to Query Posts by Different Dates in Laravel 5</title>
		<link>https://www.technig.com/laravel-5-query-posts-dates/</link>
					<comments>https://www.technig.com/laravel-5-query-posts-dates/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Mon, 06 Mar 2017 15:34:48 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=9088</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="1200" height="720" src="https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Laravel 5 query posts by dates" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates.jpg 1200w, https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates-300x180.jpg 300w, https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates-768x461.jpg 768w, https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates-1024x614.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></div>
<p>Laravel 5 is the most popular PHP Framework. Developing php application is easy, fast and enjoyable with Laravel. In this tutorial you will learn Laravel 5 query posts by dates tips and tricks. You will learn how to query today&#8217;s post; how to query this week&#8217;s post and this months posts. This tutorial is going [&#8230;]</p>
<p>The post <a href="https://www.technig.com/laravel-5-query-posts-dates/">How to Query Posts by Different Dates in Laravel 5</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="1200" height="720" src="https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Laravel 5 query posts by dates" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates.jpg 1200w, https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates-300x180.jpg 300w, https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates-768x461.jpg 768w, https://www.technig.com/wp-content/uploads/2017/03/Laravel-5-query-posts-by-dates-1024x614.jpg 1024w" sizes="(max-width: 1200px) 100vw, 1200px" /></div><p>Laravel 5 is the most popular PHP Framework. Developing php application is easy, fast and enjoyable with Laravel. In this tutorial you will learn Laravel 5 query posts by dates tips and tricks. You will learn how to query today&#8217;s post; how to query this week&#8217;s post and this months posts. This tutorial is going to short and show you the simple techniques for query posts by different dates.</p>
<h2>Laravel 5 Query Posts by Dates</h2>
<p>Laravel uses Carbon class date and time builder. You can learn more <a href="http://carbon.nesbot.com/docs/">here </a>about Carbon. As we promise to make this tutorial as short as possible, let&#8217;s start coding.</p>
<h3>How to Query Today&#8217;s Posts</h3>
<p>We assume you have a Post model and a created_at field in posts table of your database.</p>
<pre class="theme:sublime-text lang:php decode:true">$today_posts = App\Post::whereRaw('Date(created_at) = CURDATE()')-&gt;get();

</pre>
<h3>How to Query Yesterday&#8217;s Posts</h3>
<pre class="theme:sublime-text lang:php decode:true">$yesterday_posts = App\Post::whereRaw('Date(created_at) = DATE_ADD(CURDATE(), INTERVAL -1 DAY)')-&gt;get();

</pre>
<h3>How to Query this week&#8217;s Posts</h3>
<pre class="theme:sublime-text lang:php decode:true">$weekly_posts = App\Post::whereBetween( 'updated_at', [Carbon::today()-&gt;startOfWeek(), Carbon::today()-&gt;endOfWeek()] )-&gt;get();

</pre>
<h3> How to Query this Month Posts</h3>
<pre class="theme:sublime-text lang:php decode:true">$currentMonth = date('m');
$weekly_posts = App\Post::whereRaw('MONTH(created_at) = ?',[$currentMonth])-&gt;get();

</pre>
<p><strong>You might probably ask;</strong></p>
<blockquote><p><em>Why should I learn Laravel 5 query posts by dates and when can I use it?</em></p></blockquote>
<p>You don&#8217;t need to query posts only. There are many situations where you want to compare today&#8217;s post count with yesterday&#8217;s posts. Or maybe you want to count today&#8217;s sold product and yesterday&#8217;s or this week or current month. So, this technique will be quite helpful in those types of applications.</p>
<h3>How to Count Today&#8217;s Posts</h3>
<p>Here is an small tips for counting today&#8217;s orders and you can use it to count other things as well.</p>
<pre class="lang:default decode:true ">$countTodayOrders = App\Order::whereRaw('Date(created_at) = CURDATE()')-&gt;count();
</pre>
<p>All you need to do is to replace the last get() function with count() function.</p>
<h2>Conclusion</h2>
<p>We hope you have learned something new and use it in your next project to create something cool and inspiring. If you have any questions, feel free to comment it bellow.  We will answer as soon as possible. 🙂</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.technig.com/laravel-5-query-posts-dates/">How to Query Posts by Different Dates in Laravel 5</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/laravel-5-query-posts-dates/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9088</post-id>	</item>
		<item>
		<title>How to Manage Laravel 5.4 Files Upload</title>
		<link>https://www.technig.com/manage-laravel-5-4-files-upload/</link>
					<comments>https://www.technig.com/manage-laravel-5-4-files-upload/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 28 Feb 2017 16:11:17 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[file upload]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=9065</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="900" height="456" src="https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Manage Laravel 5.4 Files Upload" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload.jpg 900w, https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload-300x152.jpg 300w, https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload-768x389.jpg 768w" sizes="(max-width: 900px) 100vw, 900px" /></div>
<p>Laravel is by far the most popular PHP Framework. It has significant numbers of active community members plus many updates and packages. In this short tutorial, will show you how to upload and manage Laravel 5.4 files upload. If you are new to Laravel, make sure you read our old articles about Laravel Framework. You [&#8230;]</p>
<p>The post <a href="https://www.technig.com/manage-laravel-5-4-files-upload/">How to Manage Laravel 5.4 Files Upload</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="900" height="456" src="https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Manage Laravel 5.4 Files Upload" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload.jpg 900w, https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload-300x152.jpg 300w, https://www.technig.com/wp-content/uploads/2017/02/laravel-5.4.-Manage-Laravel-5.4-Files-Upload-768x389.jpg 768w" sizes="(max-width: 900px) 100vw, 900px" /></div><p><a href="https://laravel.com/">Laravel</a> is by far the most popular PHP Framework. It has significant numbers of active community members plus many updates and packages. In this short tutorial, will show you how to upload and manage Laravel 5.4 files upload. If you are new to Laravel, make sure you read our <a href="https://www.technig.com/tag/laravel-framework/">old articles</a> about Laravel Framework.</p>
<blockquote><p><em>You will learn the tips and technique on how to upload file, move files, give a unique name for upload files and more. </em></p></blockquote>
<h2>How to Upload Files in Laravel 5.4</h2>
<p>Firstly, let&#8217;s see how easy and straightforward it is to upload a file in Laravel and then we will manage and modify the uploaded file.</p>
<p>First, we must create a form with file input to let us upload our file.</p>
<pre class="theme:sublime-text lang:php decode:true ">{{Form::open(['route' =&gt; 'user.store', 'files' =&gt; true])}}

{{Form::label('user_photo', 'User Photo',['class' =&gt; 'control-label'])}}
{{Form::file('user_photo')}}
{{Form::submit('Save', ['class' =&gt; 'btn btn-success'])}}

{{Form::close()}}</pre>
<p>&nbsp;</p>
<p>Let&#8217;s Imagine that we are uploading a photo for our user. Here are the requirements for our user.</p>
<ul>
<li>We have table in database called user ( default Laravel auth )</li>
<li>We have an extra column called user_photo in that table</li>
<li>We have User model ( with fillable properties )</li>
<li>We have UserController</li>
<li>Resourceful Controller for User</li>
</ul>
<p>I hope you can manage the above requirements.</p>
<p>The above form will submit data to the store method in the controller ( as like other projects ). As you can see, we are using Laravel form build from LaravelCollective. Our opening form has an extra option for <span style="background-color: #d1d1d1;"><em>file =&gt; &#8220;true&#8221;. </em></span>It will add the<em><span style="background-color: #d1d1d1;"> enctype=&#8221;multipart/form-data&#8221;</span> </em>to the form which will let us upload file.</p>
<h3>How to Handle File Upload</h3>
<p>Here is how we can handle file in our controller.</p>
<pre class="theme:sublime-text lang:php decode:true ">&lt;?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
/**
* Upload the avatar for the user.
*
* @param Request $request
* @return Response
*/
public function store(Request $request)
{
$path = $request-&gt;file('user_photo')-&gt;store('avatars');

return $path;
}
}</pre>
<p>&nbsp;</p>
<p>Be default; It will upload the file to storage directory and create a folder called avatars if doesn&#8217;t exist. So far it was just like other tutorials, but how can we upload the to a public directory instead of storage and how to change the uploaded file name and give it a unique name?</p>
<h2>How to Manage Laravel 5.4 Files Upload</h2>
<p>Now, let&#8217;s move the file to the public folder and give it a unique name. That way you can access the file easily in your views.</p>
<pre class="theme:sublime-text lang:php decode:true">&lt;?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
/**
* Upload the avatar for the user.
*
* @param Request $request
* @return Response
*/
public function store(Request $request)
{

// get current time and append the upload file extension to it,
// then put that name to $photoName variable.
$photoName = time().'.'.$request-&gt;user_photo-&gt;getClientOriginalExtension();

/*
talk the select file and move it public directory and make avatars
folder if doesn't exsit then give it that unique name.
*/
$request-&gt;user_photo-&gt;move(public_path('avatars'), $photoName);


}
}</pre>
<p>That&#8217;s it. Now you can save the<span style="background-color: #dbdbdb;"> $photoName </span>to the database as a <em><span style="background-color: #dbdbdb;">user_photo</span></em> field value. You can use <em><span style="background-color: #dbdbdb;">asset(&#8216;avatars&#8217;) </span></em>function in your view and access the photos.</p>
<h2>Conclusion</h2>
<p>We hope you have learned how to manage Laravel 5.4 files upload. If you have any questions regarding Laravel and file upload, feel free to comment it bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/manage-laravel-5-4-files-upload/">How to Manage Laravel 5.4 Files Upload</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/manage-laravel-5-4-files-upload/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">9065</post-id>	</item>
		<item>
		<title>How to Change Laravel 5 Public Folder to Your Site Name?</title>
		<link>https://www.technig.com/change-laravel-5-public-folder-site-name/</link>
					<comments>https://www.technig.com/change-laravel-5-public-folder-site-name/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Sat, 30 Apr 2016 06:20:27 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7222</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>We have a few articles about Laravel framework, but we have not shown how to in install and Laravel in production. If you have ever tried to install Laravel in your site, you might have seen some problems that needs to open public folder in order to run the site properly. In short, when you open [&#8230;]</p>
<p>The post <a href="https://www.technig.com/change-laravel-5-public-folder-site-name/">How to Change Laravel 5 Public Folder to Your Site Name?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>We have a few <a href="https://www.technig.com/installing-laravel-5-on-windows/" target="_blank" rel="noopener noreferrer">articles</a> about<a href="https://www.technig.com/tag/laravel-framework/"> Laravel framework</a>, but we have not shown how to in install and Laravel in production. If you have ever tried to install Laravel in your site, you might have seen some problems that needs to open public folder in order to run the site properly. In short, when you open the Laravel application directory, you expect to open the application index file. But it&#8217;s showing the directory structure and the files and folders. In this tutorial we will show you how to solve this problem step by step with proper and reliable way to change Laravel 5 public folder.</p>
<h2>Introduction</h2>
<p>Before starting, let&#8217;s see the default directory of Laravel and how you might run the Laravel projects. If you install Laravel inside www directory of you wamp or mamp, you probably go to localhost/laravelapp direcotry. In this cause you have to navigate to public directory and it will show you the application home page. On the other hand, if you install Laravel out of the www directory, you can run it through artisan command.</p>
<pre class="lang:default decode:true">php artisan serve</pre>
<p>I this case, you don&#8217;t need to open the public directory. All you need to do is to open localhost::8000 on windows OS. It will open the Laravel home page.</p>
<p>The point is here, if you put your project online for production, you can&#8217;t run php artisan serve command there, and you don&#8217;t want to open public folder to see your home page as well. Now let&#8217;s learn how to solve this problem.</p>
<h2>How to Change Laravel 5 Public Folder?</h2>
<p>Mainly there is two way to do solve this problem. Using htaccess or changing the directory structure. We will got the second option which is the best way and reliable way as well.</p>
<h3>Step 1</h3>
<p>The default directory will look like this.</p>
<figure id="attachment_7246" aria-describedby="caption-attachment-7246" style="width: 784px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/04/change-laravel-5-pubic-folder-default-structure.jpg"><img loading="lazy" decoding="async" class="wp-image-7246 size-full" src="https://www.technig.com/wp-content/uploads/2016/04/change-laravel-5-pubic-folder-default-structure.jpg" alt="change laravel 5 public folder" width="784" height="430" /></a><figcaption id="caption-attachment-7246" class="wp-caption-text">change laravel 5 public folder default structure</figcaption></figure>
<p>Create a folder inside this directory and move all the files except public folder. We will create a folder and name it technig.</p>
<h3>Step 2</h3>
<p>Move all the files that are inside public directory one folder back. Your folder structure should look like this.</p>
<figure id="attachment_7247" aria-describedby="caption-attachment-7247" style="width: 696px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/04/laravel-5-public-directory-changed.jpg"><img loading="lazy" decoding="async" class="wp-image-7247 size-full" src="https://www.technig.com/wp-content/uploads/2016/04/laravel-5-public-directory-changed.jpg" alt="change laravel 5 public folder" width="696" height="218" /></a><figcaption id="caption-attachment-7247" class="wp-caption-text">change laravel 5 public folder</figcaption></figure>
<p>Now you can delete the public folder,</p>
<h3>Final step</h3>
<p>Open the<span style="background-color: #d4d4d4;"> index.php </span>file that you see in the above directory and change the following lines of code.</p>
<pre class="theme:sublime-text lang:php decode:true">require __DIR__.'/../bootstrap/autoload.php';
</pre>
<p>change it to</p>
<pre class="theme:sublime-text lang:php decode:true">require __DIR__.'/technig/bootstrap/autoload.php';
</pre>
<p>And the another line near line 36.</p>
<pre class="theme:sublime-text lang:php decode:true">require __DIR__.'/../bootstrap/app.php';
</pre>
<p>change this one to</p>
<pre class="theme:sublime-text lang:php decode:true">require __DIR__.'/technig/bootstrap/app.php';
</pre>
<p>You are don&#8217;t know. If you open you application directory now, you will see you Laravel home page.</p>
<h2>Conclusion</h2>
<p>It was an easy and reliable way to change Laravel 5 public folder. If you face any problem during this file changing laravel files, feel free to comment it bellow. We hope it help you. 🙂</p>
<p>The post <a href="https://www.technig.com/change-laravel-5-public-folder-site-name/">How to Change Laravel 5 Public Folder to Your Site Name?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/change-laravel-5-public-folder-site-name/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7222</post-id>	</item>
		<item>
		<title>How to Add Wysiwyg Editor in Laravel?</title>
		<link>https://www.technig.com/how-to-add-wysiwyg-editor-in-laravel/</link>
					<comments>https://www.technig.com/how-to-add-wysiwyg-editor-in-laravel/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Mon, 11 Apr 2016 05:30:45 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=6674</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>A WYSIWYG (pronounced &#8220;wiz-ee-wig&#8221;) editor is one that allows you to see what the end result will look like while the interface or document is being created. WYSIWYG is an acronym for &#8220;what you see is what you get&#8221;. Today you will learn how to add wysiwyg editor in Laravel 5 project with a few [&#8230;]</p>
<p>The post <a href="https://www.technig.com/how-to-add-wysiwyg-editor-in-laravel/">How to Add Wysiwyg Editor in Laravel?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>A WYSIWYG (pronounced &#8220;wiz-ee-wig&#8221;) editor is one that allows you to see what the end result will look like while the interface or document is being created. WYSIWYG is an acronym for &#8220;what you see is what you get&#8221;. Today you will learn how to add wysiwyg editor in Laravel 5 project with a few simple steps.</p>
<h2>What is the Purpose of Wysiwyg in Word Processing?</h2>
<p>WYSIWYG implies a user interface that allows the user to view something very similar to the end result while the document is being created. The purpose of using wysiwyg editor is to make text editing easy and simple. Using markdown is the other way of editing the text, but that is a little hard and you must learn the syntax of markdown language to be able to use it.</p>
<h2>Which Wysiwyg Editor in Laravel to Use?</h2>
<p>There are many options for Using wysiwyg editor in laravel, but which one is better and essay to use? We will point out to a few with it&#8217;s pro and cons, but will show you how to use one of them in you project. As Laravel grow up, developers contribute a lot of packages for Laravel, including packages for wysiwyg editors. The example packages are: <a href="https://github.com/Vinelab/laravel-editor" target="_blank" rel="noopener noreferrer">laravel-editor</a> by Vinelab and <a href="https://github.com/UniSharp/laravel-ckeditor" target="_blank" rel="noopener noreferrer">laravel-ckeditor</a> by UniSharp. But, this packages need a little configuration. What we are going to show you is a custom wysiwyg editor. Again there are many chooses. <a href="https://ckeditor.com/" target="_blank" rel="noopener noreferrer">Ckeditor </a>editor, <a href="https://www.froala.com/wysiwyg-editor" target="_blank" rel="noopener noreferrer">froala </a>editor and <a href="https://summernote.org/" target="_blank" rel="noopener noreferrer">summernote </a>are the good examples of wysiwyg editors. We are going to show you how to use summernote editor. Of course they will not pay me anything or there is no limitation about which one to use, but I personally like it, because it&#8217;s easy and simple to use.</p>
<figure id="attachment_6693" aria-describedby="caption-attachment-6693" style="width: 781px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/04/Wysiwyg-Editor-in-Laravel.jpg" rel="attachment wp-att-6693"><img loading="lazy" decoding="async" class="size-full wp-image-6693" src="https://www.technig.com/wp-content/uploads/2016/04/Wysiwyg-Editor-in-Laravel.jpg" alt="Wysiwyg Editor in Laravel" width="781" height="426" /></a><figcaption id="caption-attachment-6693" class="wp-caption-text">Wysiwyg Editor in Laravel</figcaption></figure>
<h2>How to Use Summernote Editor with Laravel 5?</h2>
<p>To use Summernote, I assume you have basic knowledge of using laravel, like creating form and adding JavaScript to your project. If you know them, let&#8217;s start adding this amazing wysiwyg editor in laravel 5.</p>
<p>Now, I have a <em>create.blade.php</em> in my <em>view</em> directory of my laravel project. Inside that, I have a very simple form.</p>
<p>{{Form::open([&#8216;route&#8217; =&gt; &#8216;post.store&#8217;])}}</p>
<div class="form-group">{{Form::label(&#8216;title&#8217;, &#8216;Title&#8217;)}} {{Form::text(&#8216;title&#8217;,null,array(&#8216;class&#8217; =&gt; &#8216;form-control&#8217;, &#8216;placeholder&#8217;=&gt;&#8217;Title&#8217;))}}</div>
<div class="form-group">{{Form::label(&#8216;body&#8217;, &#8216;Content&#8217;)}} {{Form::textarea(&#8216;body&#8217;,null,array(&#8216;class&#8217; =&gt; &#8216;form-control&#8217;, &#8216;placeholder&#8217;=&gt;&#8217;Content&#8217;, &#8216;id&#8217; =&gt; &#8216;technig&#8217;))}}</div>
<div class="form-group">{{Form::submit(&#8216;Publish Post&#8217;,array(&#8216;class&#8217; =&gt; &#8216;btn btn-primary btn-sm&#8217;))}}</div>
<p>{{Form::close()}}</p>
<div class="box-body">
<p><span style="font-size: inherit;">As you can see, my content textarea has an ID field of technig, so that I can add summernote to this form field.</span></p>
</div>
<h3>Adding Summer Note.</h3>
<p>Now, go to <a href="https://summernote.org/getting-started/#compiled-css-js" target="_blank" rel="noopener noreferrer">summernot.org</a> getting start page, and download the JavaScript and css fiels. Once you download the files, put it anywhere in your laravel project. I put mine on public directory. To add the css and JavaScript files, use the assets function. like so,</p>
<pre class="theme:sublime-text lang:css decode:true"> http://!!asset('/assets/css/summernote.min.css')!!

 http://!!asset('/assets/js/summernote.min.js')!!
</pre>
<p>make sure you have referenced the directory correctly. I have add the above code in master.blade.php, so you will do the same of course.</p>
<p>At the bottom of the master.blade.php file, open a script tag and add the summernote code.</p>
<pre class="theme:sublime-text lang:js decode:true">    
        $(document).ready(function() {
            $('#technig').summernote({
              height:300,
            });
        });
    
</pre>
<p>Summernote uses the jQuery framework as well, so make sure you have jQuery added to your project. As you can see, you can add some more properties to summernote functions to make it look the way you want. I have added the height:300, to make it height of the textarea 300px. You can see other properties in the official documentation of the summernote.</p>
<p>Now you have the following editor in your project.</p>
<figure id="attachment_6702" aria-describedby="caption-attachment-6702" style="width: 948px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/04/summernote-to-laravel.jpg" rel="attachment wp-att-6702"><img loading="lazy" decoding="async" class="size-full wp-image-6702" src="https://www.technig.com/wp-content/uploads/2016/04/summernote-to-laravel.jpg" alt="summernote to laravel" width="948" height="563" /></a><figcaption id="caption-attachment-6702" class="wp-caption-text">summernote to laravel</figcaption></figure>
<h2>Conclusion</h2>
<p>It was all about it, I have it has been helpful for you, if you have any question, feel free to comment it below, we will solve it for you. 🙂</p>
<p>The post <a href="https://www.technig.com/how-to-add-wysiwyg-editor-in-laravel/">How to Add Wysiwyg Editor in Laravel?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/how-to-add-wysiwyg-editor-in-laravel/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6674</post-id>	</item>
		<item>
		<title>How Laravel Elixir Work?</title>
		<link>https://www.technig.com/using-laravel-elixir/</link>
					<comments>https://www.technig.com/using-laravel-elixir/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Fri, 04 Mar 2016 04:00:17 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=6135</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>If you are developing application with Laravel, and haven&#8217;t used Laravel elixir, you are missing a cool feature of this framework. Laravel Elixir will speed up your site loading, specially when you have so many http request. If you want to speed up your site and automate some task, than you must learn how to [&#8230;]</p>
<p>The post <a href="https://www.technig.com/using-laravel-elixir/">How Laravel Elixir Work?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>If you are developing application with Laravel, and haven&#8217;t used Laravel elixir, you are missing a cool feature of this framework. Laravel Elixir will speed up your site loading, specially when you have so many http request. If you want to speed up your site and automate some task, than you must learn how to use elixir in your next Laravel project.</p>
<h2>What is Laravel Elixir?</h2>
<p>Imagine if you have so many css, JavaScript, less, scss or coffesript files to add in your Laravel Project, you might  probably include each of them like this:</p>
<pre class="theme:sublime-text lang:css decode:true ">    &lt;link rel="stylesheet" href="{!!asset('/assets/dist/css/font-awesome.css')!!}"&gt;
    &lt;link rel="stylesheet" href="{!!asset('/assets/dist/css/bootstrap.css')!!}"&gt;
    &lt;link rel="stylesheet" href="{!!asset('/assets/dist/css/style.css')!!}"&gt;

</pre>
<p>For each file you include in you project, it will send a http request. It means as much as your assets files are more, your http requests are more, your site will be to much slow.</p>
<p>In laravel Elixir, you will do like this</p>
<pre class="lang:default decode:true">&lt;link href="{{ elixir('css/app.css') }}" rel="stylesheet"&gt;
</pre>
<p>You include your css once, and it will include all your css files. But before using elixir, you must know how to combine them?</p>
<p>To combine the assets, you must use any task runner. Task runner is something like bower, if you are have ever use. We will use Gulp. If you are using Laravel 5.+, you have already everything setup. All you need is Nodejs or nmp installed in your computer. If you don&#8217;t know what nmp is, no worries, just to to <a href="https://nodejs.org/">nodejs.org</a> and install nodejs. NPM is <strong>N</strong>ode <strong>P</strong>ackage <strong>M</strong>anager. It will allow you install packages to your project using command line tools.</p>
<p>So, to make sure you have nodejs installed on your machine, run the following command on cmd or terminal on mac.</p>
<pre class="lang:default decode:true ">node -v</pre>
<p>It must show the nodejs version. If it gives any error, it means nodejs is not properly installed on your computer.</p>
<h2>How to use Gulp and Laravel Elixir?</h2>
<p>Alright, now lets use Gulp to combine our assets. Before that, run the <span style="background-color: #999999"><em>npm install</em></span> in your Laravel application directory. It will take a few minutes to install the necessary file in your application. Once it&#8217;s done, go to your application root and open the gulpfile.js file. It should look like following:</p>
<pre class="theme:sublime-text lang:php decode:true">var elixir = require('laravel-elixir');

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(function(mix) {

    mix.styles([
      'test.css'
    ]);

});
</pre>
<p>Inside elixir function, you can define your CSS or JavaScript files to be combine in single file. By default, if you write only the file names, it will search in <em>resource\assets\css</em> or <em>resource\assets\js directory. </em>If your files are anywhere else. you can change that of course.</p>
<p>You can add more assets file in elixir function to combine in one file.</p>
<pre class="theme:sublime-text lang:php decode:true ">elixir(function(mix) {


    mix.styles([
      'test1.css',
      'test2.css',
      'test3.css'
    ]);

  	mix.styles([
      'test1.js',
      'test2.js',
      'test3.js'
    ]);


});
</pre>
<p>&nbsp;</p>
<p>Now, You can run the gulp command in your app root, and it will generate a CSS file in <span style="background-color: #808080"><em>public\css\all.css . </em></span></p>
<p>And one file for JavaScript in same directory <span style="background-color: #808080"><em>js\all.js.</em></span></p>
<p>To include the file, open the master blade or any other view and use elixir function to include the file generated in public directory of you app.</p>
<p>Example:</p>
<pre class="theme:sublime-text lang:xhtml decode:true ">&lt;link rel="stylesheet" href="{{ elixir('css/all.css') }}"&gt;

&lt;script src="{{ elixir('js/app.js') }}"&gt;&lt;/script&gt;</pre>
<p>We are done!!. this much easy. Now if you look at you application size, it has increased to 120+ MB. You might be surprise, why this happened. Well there is a new folder in your application root (node_modules). You can remove that folder when your application development completed and you send it for production.</p>
<h3>Conclusion</h3>
<p>There are a lot more that Laravel Elixir can do, like compiling less, scss, coffeScript files and auto prefixing the new CSS3 properties. So, I hope it has been informative for you, if you have any question or error, feel free to comment it below. 🙂</p>
<p>The post <a href="https://www.technig.com/using-laravel-elixir/">How Laravel Elixir Work?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/using-laravel-elixir/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6135</post-id>	</item>
		<item>
		<title>How to Share Data to All Views in Laravel 5.2</title>
		<link>https://www.technig.com/share-data-to-all-views-in-laravel/</link>
					<comments>https://www.technig.com/share-data-to-all-views-in-laravel/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 23 Feb 2016 04:00:30 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=5906</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>We have talked about Laravel Framework so many times. It&#8217;s easy to use, flexible and fast. It&#8217;s true that, if you do not practice, you will never learn anything. As much as Laravel is amazing to use, it&#8217;s hard to master as well. In today&#8217;s tutorial, we will show you the tips and tricks about, [&#8230;]</p>
<p>The post <a href="https://www.technig.com/share-data-to-all-views-in-laravel/">How to Share Data to All Views in Laravel 5.2</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>We have talked about <a href="https://www.technig.com/installing-laravel-5-on-windows/" target="_blank" rel="noopener noreferrer">Laravel</a> <a href="https://laravel.com/docs/5.2/views" target="_blank" rel="noopener noreferrer">Framework</a> so many times. It&#8217;s easy to use, flexible and fast. It&#8217;s true that, if you do not practice, you will never learn anything. As much as Laravel is amazing to use, it&#8217;s hard to master as well. In today&#8217;s tutorial, we will show you the tips and tricks about, how to share data to all views in laravel 5.2.</p>
<h3>How to share data to all views ?</h3>
<p>Imagine if you have an <span style="background-color: #999999;">o<em>ptions</em></span> table on you database that store all your application settings and you want to show it&#8217;s content to every view. So how you do that?</p>
<p>Laravel made it easy. One way and the most short and basic way to share data to all views is to use <em><span style="background-color: #999999;">view:share()</span>. </em>Let see and example. The same above example, you have your options table in you database and you want to access its data in your <span style="background-color: #999999;"><em>master.blade.php</em></span> page or any there view.</p>
<p>Our table structure for Options table in database looks like this:</p>
<pre class="theme:sublime-text lang:php decode:true">id - int : auto-increment 
name - varchar : 50
value - varchar : 50</pre>
<p>Open your <span style="background-color: #999999;"><em>AppServiceProvider.php </em></span>which is under <span style="background-color: #999999;"><em>App/Providers</em> direcory.</span> Your code might look like this:</p>
<pre class="theme:sublime-text lang:php decode:true">&lt;?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Auth;
class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()

    {
       //
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

}</pre>
<p>Now, add the following codes. Make sure you add the <span style="background-color: #999999;"><em>use App\Option</em></span> Model at the top</p>
<pre class="theme:sublime-text lang:php decode:true">&lt;?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Option;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
      $companyName = Option::find(1);
      $copyRight = Option::find(2);
      view()-&gt;share('companyName', $companyName);
      view()-&gt;share('copyRight', $copyRight);
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

}
</pre>
<p>Inside boot function we created two variable for two row in option table. the first one contain <em><span style="background-color: #999999;">$companyname</span>,</em> and the second one is for <span style="background-color: #999999;"><em>$copyright</em></span>. (if you have more, you can add more)</p>
<p>So, the <em><span style="background-color: #999999;">view-&gt;share()</span></em> will take two arguments. First one, a name to be accessible in views, and second the data that pass to views.</p>
<h4>How to access data in views?</h4>
<p>As I said, the first argument is the name that you can access the data with. So, in your view, just echo the variable. example</p>
<pre class="theme:sublime-text lang:php decode:true">&lt;p&gt;
  {{$companyName}}
&lt;/p&gt;

&lt;!-- or --&gt;

&lt;p&gt;
  {{$copyRight}}
&lt;/p&gt;</pre>
<p>Conclusion</p>
<p>So, that was it. Very easy and simple. There are some other says also that you can share data to all view like view composer. We will cover those topic in future tutorials. I hope it has been informative for you.</p>
<p>The post <a href="https://www.technig.com/share-data-to-all-views-in-laravel/">How to Share Data to All Views in Laravel 5.2</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/share-data-to-all-views-in-laravel/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5906</post-id>	</item>
		<item>
		<title>How to Use Faker and Seeds in Laravel 5?</title>
		<link>https://www.technig.com/faker-seeds-in-laravel-5/</link>
					<comments>https://www.technig.com/faker-seeds-in-laravel-5/#comments</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Sat, 06 Feb 2016 21:13:26 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel Framework]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP framework]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=5358</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>Developing application with Laravel framework has become very easy. If you want to develop any web application, you will definitely refer to Laravel as PHP developer. Beside other amazing features that Laravel 5 gives us, here is something called Faker Seeds in Laravel 5. In this short tutorial will learn what Faker Seeds in laravel 5 [&#8230;]</p>
<p>The post <a href="https://www.technig.com/faker-seeds-in-laravel-5/">How to Use Faker and Seeds in Laravel 5?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>Developing application with <a href="https://laravel.com">Laravel framework</a> has become very easy. If you want to develop any web application, you will definitely refer to Laravel as PHP developer. Beside other amazing features that Laravel 5 gives us, here is something called Faker Seeds in Laravel 5. In this short tutorial will learn what Faker Seeds in laravel 5 is, and how to use them in our project to speed up our development. 5</p>
<h2>What is Faker Seeds in Laravel 5?</h2>
<p>Basically, <a href="https://github.com/fzaninotto/Faker">Faker</a> is a PHP library that generates fake data for you and <a href="https://laravel.com/docs/5.1/seeding">Seed</a> is a class in Laravel for seeding test data to your database. Faker is just a library, it&#8217;s not only for Laravel, you can use it on any other PHP projects as well. Even if you develop a small application, you will need some test data to work with. So Faker and is the best library to generate random data for your database.</p>
<h2>How to use Faker seeds in laravel 5 ?</h2>
<p>Now, how to use it in our Laravel projects. The good news is this that it&#8217;s already included in every laravel 5 project and you don&#8217;t need to worry about any extra work or installation.  All seed classes are stored in <strong><span style="background-color: #ff6600;"><em>database/seeds</em></span></strong> directory.</p>
<p>Imagine if you want to generate some 5 to 10 post for your blog project, you will create a seed class in your <strong><em>seed</em></strong> directory. You can give your class any name, but it&#8217;s better to be sensible convention. To create a seed file, you can create it manually, as well as using <strong><em>artisan command. </em></strong></p>
<p>To create a seeder class for our post, open command line and navigate to your project directory. Now write the following command.</p>
<pre class="theme:sublime-text lang:php decode:true">php artisan make:seeder PostsTableSeeder</pre>
<p>Now you have a File called <em>PostsTableSeeder.php </em>seeds folder. Open the file and you will see the following codes.</p>
<pre class="theme:sublime-text lang:php decode:true ">&lt;?php

use Illuminate\Database\Seeder;
use Faker\Factory as Faker;

class PostsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
    }
}
</pre>
<p>Probably, you one line of code is missing from your code and that is the second line which says : We are using Fakder library in this class.</p>
<h3>Generating Test Data.</h3>
<p>Now, lets generate some test data. To do so, you must run the seeder, but before running the seeder, you must add some extra lines of code to your seeder class. Inside run function, you must specify the column name with type of data you want to put in.</p>
<pre class="theme:sublime-text lang:php decode:true ">&lt;?php

use Illuminate\Database\Seeder;
use Faker\Factory as Faker;

class PostsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
      $faker = Faker::create();
      foreach (range(1,5) as $index) {
        DB::table('posts')-&gt;insert([
            'title' =&gt; $faker-&gt;catchPhrase,
            'content' =&gt; $faker-&gt;paragraph,
            'created_at' =&gt; $faker-&gt;dateTime($max = 'now'),
            'updated_at' =&gt; $faker-&gt;dateTime($max = 'now'),
        ]);
      }
    }
}</pre>
<p>What the above code do?</p>
<p>First we have created an instance of Faker class to the variable <strong><em>$faker</em></strong>. Now we can use the <strong><em>$faker</em></strong> object to access the types of data we want to insert in database. There are many types of data that you can explore in Faker Documentation <a href="https://github.com/fzaninotto/Faker">here</a>. We have just used some basic types like <em>catchPhrase</em>, <em>paragraph</em> and <em>datetime</em>. The foreach will loop 5 times and generate 5 record in database which you can increase or decrease those numbers.</p>
<p>So once you wrote the necessary code for your database table, you can run it through php artisan.</p>
<pre class="theme:sublime-text lang:php decode:true ">php artisan db:seed --class=PostsTableSeeder</pre>
<p>The above command will Generate 5 posts for your posts table in the database.</p>
<h3>Conclusion</h3>
<p>You will not learn anything unless you practice it. So if you want to master in Laravel or any other things, you must start doing it practically. Of course there is a lot that you can do with Faker and seeder in Laravel, but is was just the basics. I hope you have learned something from this tutorial, till next time keep practicing.</p>
<p>The post <a href="https://www.technig.com/faker-seeds-in-laravel-5/">How to Use Faker and Seeds in Laravel 5?</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/faker-seeds-in-laravel-5/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5358</post-id>	</item>
	</channel>
</rss>
