<?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/"
	
xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
>

<channel>
	<title>Jeff Mould</title>
	<atom:link href="https://www.jeffmould.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jeffmould.com</link>
	<description>A Tech Blog by Jeff Mould</description>
	<lastBuildDate>Thu, 30 Jun 2016 20:38:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.2</generator>
<site xmlns="com-wordpress:feed-additions:1">18279959</site>	<item>
		<title>Laravel 5.4 Redirect after Password Reset Email Sent</title>
		<link>https://www.jeffmould.com/2017/09/08/laravel-5-4-redirect-password-reset-email-sent/</link>
				<comments>https://www.jeffmould.com/2017/09/08/laravel-5-4-redirect-password-reset-email-sent/#respond</comments>
				<pubDate>Fri, 08 Sep 2017 05:05:49 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[laravel 5.4]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=1181</guid>
				<description><![CDATA[<p>Laravel 5.4 comes with a built-in authentication library that works well for most cases. However, the documentation can be a little limited in some instances. One of those instances in the forgot password functionality. When a user requests to reset their password they enter their email address and hit submit. After which an email is [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2017/09/08/laravel-5-4-redirect-password-reset-email-sent/">Laravel 5.4 Redirect after Password Reset Email Sent</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>Laravel 5.4 comes with a built-in authentication library that works well for most cases. However, the documentation can be a little limited in some instances. One of those instances in the forgot password functionality. When a user requests to reset their password they enter their email address and hit submit. After which an email is sent to them with a token to reset their password. The problem is that once they click submit to have that email sent to them, Laravel by default, redirects back to that page. In some applications, you may not want this to be the default behavior. In my case, I wanted the user to be redirected back to the login screen with a status message that a reset link had been sent to them. Unfortunately, the Laravel 5.4 documentation does not give a clear explanation of how to achieve this. Googling and searching around the internet returns plenty of links for redirecting after the user resets their password, but not after the reset email has been sent to them.</p>
<p>Come to find out there is a simple fix to this issue. You simply need to override the default sendPasswordLinkResponse function from Illuminate/Foundation/Auth/SendsPasswordResetEmails.php in your App/Auth/ForgotPasswordController.php.</p>
<p>To begin, edit your App/Auth/ForgotPasswordController.php and add the following:</p>
<p>&nbsp;</p>
<p></p><pre class="crayon-plain-tag">/**
     * Get the response for a successful password reset link.
     *
     * @param  string  $response
     * @return \Illuminate\Http\RedirectResponse
     */
    public function sendResetLinkResponse($response)
    {
        return redirect()-&gt;route('login')-&gt;with('status', trans($response));
    }</pre><p></p>
<p>You can add whichever route you want to redirect to, in this case it goes back to the login page. Simple as that.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2017/09/08/laravel-5-4-redirect-password-reset-email-sent/">Laravel 5.4 Redirect after Password Reset Email Sent</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2017/09/08/laravel-5-4-redirect-password-reset-email-sent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">1181</post-id>	</item>
		<item>
		<title>How to Fix Laravel 5.2 Token Mismatch Errors</title>
		<link>https://www.jeffmould.com/2016/06/30/laravel-5-2-token-mismatch-errors/</link>
				<comments>https://www.jeffmould.com/2016/06/30/laravel-5-2-token-mismatch-errors/#comments</comments>
				<pubDate>Thu, 30 Jun 2016 20:38:00 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[csrf]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[laravel 5.2]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[token mismatch error]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=1032</guid>
				<description><![CDATA[<p>Pulling your hair out over token mismatch errors in Laravel 5.2? Everything worked fine up until you ran installed Laravel 5.2? Googled it, tried the various fixes scattered across a multitude of sites? Realize you are not the only one with the same problem based on the number of results you find. Don&#8217;t worry, this [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/06/30/laravel-5-2-token-mismatch-errors/">How to Fix Laravel 5.2 Token Mismatch Errors</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>Pulling your hair out over token mismatch errors in Laravel 5.2? Everything worked fine up until you ran installed Laravel 5.2? Googled it, tried the various fixes scattered across a multitude of sites? Realize you are not the only one with the same problem based on the number of results you find. Don&#8217;t worry, this isn&#8217;t another &#8220;fix&#8221; that worked for one person and doesn&#8217;t seem to work for anyone else. If you are storing your sessions in your database and look at the sessions table you notice there are multiple sessions being created. Everything else seems to be working for you, but whenever you POST a form a new session is generated by Laravel resulting in a token mismatch error. So how do you fix it?</p>
<p>Without going into all the nuts and bolts of why this works, I will just cut to the chase. </p>
<h2>Resolving Token Mismatch Errors in Laravel 5.2</h2>
<p><strong>Step 1:</strong></p>
<p>Go to your App\routes.php file. Find the grouping of routes that have a &#8220;web&#8221; middleware. It will look something like this:</p>
<p></p><pre class="crayon-plain-tag">Route::group(['middleware' =&gt; 'web'], function () {
    .....
});</pre><p></p>
<p><strong>Step 2:</strong></p>
<p>Change the group from middleware to middlewareGroups so that it looks like this now:</p>
<p></p><pre class="crayon-plain-tag">Route::group(['middlewareGroups' =&gt; 'web'], function () {
    .....
});</pre><p></p>
<p><strong>Step 3:</strong></p>
<p>Well there is no step 3. That&#8217;s all there is to it. To learn more about how and why this fixes the issue you can find out more here:</p>
<p class="gh-header-title"><a href="https://github.com/laravel/framework/issues/13000" target="_blank"><span class="js-issue-title">Weird session behaviour with routes in web middleware group</span></a></p>
<p class="gh-header-title">Hopefully this saves you hours and a lot of hair <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/06/30/laravel-5-2-token-mismatch-errors/">How to Fix Laravel 5.2 Token Mismatch Errors</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/06/30/laravel-5-2-token-mismatch-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">1032</post-id>	</item>
		<item>
		<title>How to Get Sirius XM Deals</title>
		<link>https://www.jeffmould.com/2016/05/27/get-sirius-xm-deals/</link>
				<comments>https://www.jeffmould.com/2016/05/27/get-sirius-xm-deals/#respond</comments>
				<pubDate>Fri, 27 May 2016 21:00:39 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[satellite]]></category>
		<category><![CDATA[sirius radio]]></category>
		<category><![CDATA[sirius xm deals]]></category>
		<category><![CDATA[SiriusXM]]></category>
		<category><![CDATA[xm radio]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=1013</guid>
				<description><![CDATA[<p>My favorite time of year&#8230;summer&#8230;and time to renew the Sirius XM radio subscription. It boggles my mind how Sirius XM deals work, but for some reason nobody ever wants to give you the straight answer when you talk to them. So here is how I get the best Sirius XM deals. Every June I get [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/05/27/get-sirius-xm-deals/">How to Get Sirius XM Deals</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>My favorite time of year&#8230;summer&#8230;and time to renew the Sirius XM radio subscription. It boggles my mind how Sirius XM deals work, but for some reason nobody ever wants to give you the straight answer when you talk to them. So here is how I get the best Sirius XM deals.</p>
<p>Every June I get my &#8220;time to renew&#8221; email notice. I don&#8217;t have auto-renewal, because that only signals to Sirius XM that they can charge your credit card whatever the going rate may be. Bad idea! A quick look online, from the link in the email that says &#8220;a special renewal offer&#8221; shows a staggering monthly price of almost $18.00. WHAT?!?! I can subscribe to Pandora and plug my phone into my car for half that price. Thanks but no thanks.</p>
<p>Calling customer service gets us a little movement on the price. I know they have deals, I know I can prepay for 5 or 6 months and get a much better rate than the website advertises. I ask the rep what Sirius XM deals they have going on and am given one price of $25 plus fees/taxes bringing the total to about $28 for 6 months. Wow I just got 6 months for a 1 1/2 times what their website said. A normal customer would probably give up here, and to be honest this wasn&#8217;t a bad deal, but I knew they had better.</p>
<p>A little background real quick, I currently had a 5 month Select Plan for $18.00 plus fees/taxes. For budget reasons, and I really don&#8217;t want to spend more on a radio service, I wanted to keep the exact same plan and pricing. So while the $25 plus fees/taxes for 6 months was essentially the same price, it was not the price I was ready to pay today. Hey a bucks a buck and I wasn&#8217;t ready to spend $8 more for one extra month.</p>
<p>I asked to speak with a supervisor. After a brief 15 minute hold the gentleman came on to inform me that there were currently no other deals. I asked for some details about this 6 months for $25 Sirius XM Deal to see what level of service. At this point I was debating whether to fight for a better deal, but I wanted to know if I was getting an All Access plan or the standard Select plan. I really could care less as I only ever use the Select stations anyway, but hey I am here to get the best deal possible.</p>
<p>After going back and forth with the &#8220;supervisor&#8221; for probably close to 15 minutes we were no where closer. It was at this point I wanted to see if this was truly their best deal. I asked him if I were to cancel my subscription, what would be the &#8220;please come back to Sirius XM deal&#8221; they would send me in a few weeks in the mail. The brief pause was really the only answer I needed, but he proceeded to say he didn&#8217;t know what they would offer. BINGO! I knew there was a better deal for the taking. </p>
<p>Time to cancel my subscription. I asked him to go ahead and cancel my subscription. He didn&#8217;t even argue or try to keep me as a customer. Five minutes later, no active Sirius XM subscription and the radio has been deactivated.</p>
<h2>Let&#8217;s Get the best Sirius XM Deals</h2>
<p>After about a 10 minute wait, I logged back in to my Sirius XM account online. The message that I had no active radios quickly popped up with a link to &#8220;Let&#8217;s see what specials we have for you&#8221;. Perfect! Click the link and low and behold, now I have completely different pricing available.</p>
<p>Were the deals that much better? Not really, but they were different and the one I wanted was front and center. But what I wanted was right there at the top, 5 months for $18 plus fees/taxes. There were one or two other Sirius XM deals available, but nothing I wanted.</p>
<p>Long story short, you want the best Sirius XM deals, cancel your subscription when it is up for renewal, wait a few minutes after canceling, log in to your account online and presto the best Sirius XM deals are ready and waiting for you.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/05/27/get-sirius-xm-deals/">How to Get Sirius XM Deals</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/05/27/get-sirius-xm-deals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">1013</post-id>	</item>
		<item>
		<title>Laravel 5 Error Handling</title>
		<link>https://www.jeffmould.com/2016/05/25/laravel-5-error-handling/</link>
				<comments>https://www.jeffmould.com/2016/05/25/laravel-5-error-handling/#respond</comments>
				<pubDate>Wed, 25 May 2016 20:12:58 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[error handler]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[laravel5]]></category>
		<category><![CDATA[laravel5.2]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[whoops]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=1007</guid>
				<description><![CDATA[<p>Laravel 5 error handling does a good job, but there are some areas where it could be beefed up. For example, in the case of handling CSRF token mismatch errors or missing models. Also, while in development for a site, I do miss the old Whoops handler for clean error presentation, instead of having to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/05/25/laravel-5-error-handling/">Laravel 5 Error Handling</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>Laravel 5 error handling does a good job, but there are some areas where it could be beefed up. For example, in the case of handling CSRF token mismatch errors or missing models. Also, while in development for a site, I do miss the old Whoops handler for clean error presentation, instead of having to dig through logs. I understand why they got rid of it though, and appreciate that adding support back is as simple as a few lines of code. </p>
<p>Below we are going to go over some basic changes to the Laravel handler to add better support for some Exceptions. I will also go over adding support for the Laravel Whoops error handler if you would like to install it as well.</p>
<h2>Improving Laravel 5.2 Error Handling</h2>
<p>Laravel error handling is handled by the App/Exceptions/Handler.php file. </p>
<p></p><pre class="crayon-plain-tag">public function render($request, Exception $e)
    {

        // the below code is for Whoops support. Since Whoops can open some security holes we want to only have it
        // enabled in the debug environment. We also don't want Whoops to handle 404 and Validation related exceptions.
        if (config('app.debug') &amp;&amp; !($e instanceof ValidationException) &amp;&amp; !($e instanceof HttpResponseException))
        {
            return $this-&gt;renderExceptionWithWhoops($e);
        }
        
        
        // this line allows you to redirect to a route or even back to the current page if there is a CSRF Token Mismatch
        if($e instanceof TokenMismatchException){
            return redirect()-&gt;route('index');
        }       

        // let's add some support if a Model is not found 
        // for example, if you were to run a query for User #10000 and that user didn't exist we can return a 404 error
        if ($e instanceof ModelNotFoundException) {
            return response()-&gt;view('errors.404', [], 404);
        }  

        // Let's return a default error page instead of the ugly Laravel error page when we have fatal exceptions
        if($e instanceof \Symfony\Component\Debug\Exception\FatalErrorException) {
            return \Response::view('errors.500',array(),500);
        }
       
        // finally we are back to the original default error handling provided by Laravel
        if($this-&gt;isHttpException($e))
        {
            switch ($e-&gt;getStatusCode()) {
                // not found
                case 404:
                    return \Response::view('errors.404',array(),404);
                break;
                // internal error
                case 500:
                    return \Response::view('errors.500',array(),500);   
                break;
 
                default:
                    return $this-&gt;renderHttpException($e);
                break;
            }
        }
        else
        {
            return parent::render($request, $e);
        }       
        
    }</pre><p></p>
<h2>Adding Whoops Error Handling Support to Laravel 5</h2>
<p>I touched on this briefly in the function above. If you noticed the <em>if&#8230;then</em> statement points to a separate function within the App/Exceptions/Handler.php file.  That function is below and you should include it in the Handler.php file as well. But before we can begin to use Whoops we still need to install it.</p>
<p>Installing Whoops is as simple as running a composer command:</p>
<p></p><pre class="crayon-plain-tag">composer require filp/whoops:~1.0</pre><p></p>
<p>That&#8217;s all there is to it. Finally, add the below function and make sure you included the <em>if&#8230;then</em> statement from the updated <strong>render function</strong> above. Now when you get an error in Laravel 5 you will get a nice dump to the screen. </p>
<p></p><pre class="crayon-plain-tag">/**
     * Render an exception using Whoops.
     * 
     * @param  \Exception $e
     * @return \Illuminate\Http\Response
     */
    protected function renderExceptionWithWhoops(Exception $e)
    {
        $whoops = new \Whoops\Run;
        $whoops-&gt;pushHandler(new \Whoops\Handler\PrettyPageHandler());

        return new \Illuminate\Http\Response(
            $whoops-&gt;handleException($e),
            $e-&gt;getStatusCode(),
            $e-&gt;getHeaders()
        );
    }</pre><p></p>
<p><strong>One last reminder:</strong></p>
<p>Remember to disable Whoops though when in production. Failing to do so can open up some security holes to your users. Database passwords and user passwords can be dumped in clear text to the user and you obviously do not want that in a production environment.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/05/25/laravel-5-error-handling/">Laravel 5 Error Handling</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/05/25/laravel-5-error-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">1007</post-id>	</item>
		<item>
		<title>How-To Install Let&#8217;s Encrypt SSL Certificate with Laravel</title>
		<link>https://www.jeffmould.com/2016/05/14/install-lets-encrypt-ssl-certificate-laravel/</link>
				<comments>https://www.jeffmould.com/2016/05/14/install-lets-encrypt-ssl-certificate-laravel/#comments</comments>
				<pubDate>Sun, 15 May 2016 00:17:31 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[laravel5]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=995</guid>
				<description><![CDATA[<p>Let&#8217;s Encrypt has made obtaining and installing SSL certificates a no-brainer for websites. However, if you plan to use Let&#8217;s Encrypt with Laravel running on NGINX there are a couple little modifications you will need to make to the install process. The problem is that with Laravel, your NGINX config probably points to your public [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/05/14/install-lets-encrypt-ssl-certificate-laravel/">How-To Install Let&#8217;s Encrypt SSL Certificate with Laravel</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<div id="attachment_1001" style="width: 349px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1001" class="size-full wp-image-1001" src="http://www.jeffmould.com/wp-content/uploads/2016/05/lets-encrypt-logo.jpg" alt="Let's Encrypt SSL" width="339" height="81" srcset="https://www.jeffmould.com/wp-content/uploads/2016/05/lets-encrypt-logo.jpg 339w, https://www.jeffmould.com/wp-content/uploads/2016/05/lets-encrypt-logo-150x36.jpg 150w, https://www.jeffmould.com/wp-content/uploads/2016/05/lets-encrypt-logo-300x72.jpg 300w" sizes="(max-width: 339px) 100vw, 339px" /><p id="caption-attachment-1001" class="wp-caption-text">Let&#8217;s Encrypt SSL</p></div>
<p>Let&#8217;s Encrypt has made obtaining and installing SSL certificates a no-brainer for websites. However, if you plan to use <a href="https://letsencrypt.org/" target="_blank">Let&#8217;s Encrypt</a> with <a href="http://www.laravel.com" target="_blank">Laravel</a> running on <a href="http://nginx.org/" target="_blank">NGINX</a> there are a couple little modifications you will need to make to the install process. The problem is that with Laravel, your NGINX config probably points to your public directory as the root (for example: /var/www/example.com/public/). Let&#8217;s Encrypt, however, wants a directory under the root named .well-known and needs to have access to that directory publicly when installing the certificates. If you fail to account for this you will get &#8220;client lacks sufficient privileges&#8221; errors when attempting to obtain a certificate.</p>
<p>Below is a step-by-step guide for installing a Let&#8217;s Encrypt SSL certificate with Laravel running on NGINX. For this post I am going to assume that you are familiar with installing <a href="http://www.jeffmould.com/2013/11/26/install-nginx-source-ubuntu-12-04/" target="_blank">NGINX</a> and Laravel. Note also that this install is done on Ubuntu 14.04 and assumes you have access to a sudo user.</p>
<h2>Installing Let&#8217;s Encrypt SSL on NGINX with Laravel</h2>
<p><strong>Step 1</strong></p>
<p>Let&#8217;s create a directory in your Laravel root directory. This directory is going to be called .well-known (IMPORTANT: notice the period in front of the directory name to create a hidden directory):</p>
<p></p><pre class="crayon-plain-tag">$ mkdir /var/www/example.com/.well-known</pre><p></p>
<p><strong>Step 2</strong></p>
<p>Make sure that the permissions on the directory are set to 755. You will also want to make sure that the nginx user/group is able to read/write to the directory.</p>
<p></p><pre class="crayon-plain-tag">chmod 755 .well-known</pre><p></p>
<p><strong>Step 3</strong></p>
<p>This step assumes you already have a Laravel site running on the server via HTTP or have previously configured your NGINX config file for your site. In this step you will want to make two changes. First you will need to change the root statement to point to the root of the site and not the public directory. Second you will add a location directive for the .well-known directory. The following changes should be made in your nginx.conf file (or whichever file contains your configuration for your site):</p>
<p></p><pre class="crayon-plain-tag"># we are going to comment out a line similar to this:
#root /var/www/example.com/public/;

# and we are going to add a line like this:
root /var/www/example.com/;

#next we will add the following location directive:
location ~ /.well-known { allow all; }</pre><p></p>
<p><strong>Step 4</strong></p>
<p>Create the dhparam.pem file, which is used by the Diffie-Hellman algorithm.</p>
<p></p><pre class="crayon-plain-tag">openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048</pre><p></p>
<p> <strong>Step 5</strong></p>
<p>Install the Let&#8217;s Encrypt client (note the $ represents the command prompt):</p>
<p></p><pre class="crayon-plain-tag">$ apt-get update

$ apt-get -y install git

$ git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt</pre><p></p>
<p><strong>Step 6</strong></p>
<p>Change to the /opt/letsencrypt directory and run the client. Be sure to change the path and domain name to point to your site and domain. Note that we are assuming you already have a registered domain name and that the DNS points to your webserver properly.</p>
<p></p><pre class="crayon-plain-tag">$ cd /opt/letsencrypt

$ letsencrypt-auto certonly -a webroot --agree-tos --renew-by-default --webroot-path=/var/www/example.com -d example.com</pre><p></p>
<p><strong>Step 7</strong></p>
<p>You should see a message saying your certificate was successfully created.</p>
<p></p><pre class="crayon-plain-tag">IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/example.com/fullchain.pem. Your
   cert will expire on 2016-08-04. To obtain a new version of the
   certificate in the future, simply run Let's Encrypt again.
 - If you like Let's Encrypt, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le</pre><p></p>
<p>If there were errors, the message will give you a description of the issue. In most cases problems can relate to one of three main issues:</p>
<ol>
<li>You don&#8217;t have proper permissions set on the .well-known directory above.</li>
<li>You don&#8217;t currently own the domain.</li>
<li>Your DNS is not configured properly.</li>
</ol>
<p>Assuming your certificate was created successfully, the message should also contain a path to your new certificate. Although the message only includes the path for the public key file (.pem), the path for the private key will be the same as well. Make note of this path as you will now edit your nginx conf file (or whichever file contains your site configuration). </p>
<p><strong>Step 8</strong></p>
<p>Finally, we are going to bring it all together. A couple things we need to remember: (1) the path the the dhparam.pem file we created in Step 4 above; and (2) the path to our certificates from Step 7 above. We are now going to edit the nginx config file to enable SSL (HTTPS) on our site and disable the HTTP site.</p>
<p></p><pre class="crayon-plain-tag">...

server {
   listen 443;

   server_name example.com;

   # make sure to point the root back to the public directory in the case of Laravel
   root /var/www/example.com/public/;

   # these are the paths to our certificate files. You should really only have to
   # change the names of the domain directory, as the file names are consistent with
   # Let's Encrypt.
   ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
   ssl_prefer_server_ciphers on;
   ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
   ssl_session_cache shared:SSL:10m;

   # this is the path the to dhparam.pem file you created in Step 4
   ssl_dhparam /etc/ssl/certs/dhparam.pem;

   ssl_session_timeout 1d;
   ssl_session_tickets off;
   ssl_stapling on;
   ssl_stapling_verify on;

...</pre><p></p>
<p>You may or may not have other server specific directives in your file, but these are the important ones to enable SSL. You should also create a 301 redirect for the HTTP site to point to the HTTPS version.</p>
<p><strong>Step 9</strong></p>
<p>Restart nginx and you should be good to go.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/05/14/install-lets-encrypt-ssl-certificate-laravel/">How-To Install Let&#8217;s Encrypt SSL Certificate with Laravel</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/05/14/install-lets-encrypt-ssl-certificate-laravel/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">995</post-id>	</item>
		<item>
		<title>Bootstrap 4 Mobile Menu &#8211; Collapsible Nav</title>
		<link>https://www.jeffmould.com/2016/04/03/bootstrap-4-mobile-menu/</link>
				<comments>https://www.jeffmould.com/2016/04/03/bootstrap-4-mobile-menu/#respond</comments>
				<pubDate>Sun, 03 Apr 2016 07:35:09 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Bootstrap 4]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[bootstrap 4]]></category>
		<category><![CDATA[bootstrap4]]></category>
		<category><![CDATA[collapsible]]></category>
		<category><![CDATA[dropdown]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[media query]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=957</guid>
				<description><![CDATA[<p>This weekend I started experimenting with Bootstrap 4 which is in its Alpha 2 release. While I like what I saw, one lagging feature stuck out to me. Although it works to some extent there are few key CSS features missing to make the Bootstrap 4 navigation collapse like it did in Bootstrap 3. If [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/04/03/bootstrap-4-mobile-menu/">Bootstrap 4 Mobile Menu &#8211; Collapsible Nav</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>This weekend I started experimenting with <a href="http://v4-alpha.getbootstrap.com/" target="_blank">Bootstrap 4</a> which is in its Alpha 2 release. While I like what I saw, one lagging feature stuck out to me. Although it works to some extent there are few key CSS features missing to make the Bootstrap 4 navigation collapse like it did in Bootstrap 3. If you simply use the examples provided in the documentation, you will notice that the menu is far from responsive when collapsed on mobile devices.</p>
<p>Luckily there are a few simple fixes we can do to make things right so that our Bootstrap 4 mobile menu (collapsible navigation) is the same functionality as the navbar collapse in Bootstrap 3. For this tutorial I am going to use the Dashboard example from the documentation. You can find the Dashboard example here: <a href="http://v4-alpha.getbootstrap.com/examples/dashboard/" target="_blank">http://v4-alpha.getbootstrap.com/examples/dashboard/</a></p>
<h2>Bootstrap 4 Mobile Menu</h2>
<p>First things first, let&#8217;s make some small edits to the menu:</p>
<p></p><pre class="crayon-plain-tag">&lt;nav class="navbar navbar-dark navbar-fixed-top bg-inverse"&gt;
      &lt;button type="button" class="navbar-toggler hidden-sm-up pull-xs-right" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"&gt;
        &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
        &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;span class="icon-bar"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;a class="navbar-brand" href="#"&gt;Project name&lt;/a&gt;
      &lt;div class="collapse navbar-toggleable-xs" id="navbar"&gt;
        &lt;nav class="nav navbar-nav pull-xs-left"&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Dashboard&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Settings&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Profile&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Help&lt;/a&gt;
        &lt;/nav&gt;
        &lt;form class="pull-sm-right"&gt;
          &lt;input type="text" class="form-control" placeholder="Search..."&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/nav&gt;</pre><p></p>
<p>You will notice a few things:</p>
<ol>
<li>For the button, we added a &#8220;<em>pull-xs-right</em>&#8221; class. Without this the button appears to the left of the branding element. </li>
<li>We added the &#8220;<em>collapse</em>&#8221; and &#8220;<em>navbar-toggleable-xs</em>&#8221; classes to the <em>id=&#8221;navbar&#8221;</em> div.  Without this the navbar will not be collapsible. Also, this tells Bootstrap to collapse for &#8220;xs&#8221; media.</li>
<li>Finally we changed the &#8220;<em>pull-xs-right</em>&#8221; class on the form element to &#8220;<em>pull-sm-right</em>&#8220;.</li>
</ol>
<h2>Bootstrap 4 CSS </h2>
<p>Our next set of changes is to add some styling. Instead of making edits to the Bootstrap SASS files, which you could do, but I didn&#8217;t want to in this case, just in case future releases resolved this issue or made additional changes. So I simply created another CSS file and included it.</p>
<p></p><pre class="crayon-plain-tag">.navbar-brand {
  float: none;
}
.navbar-nav .nav-item {
  float: none;
}
.navbar-divider,
.navbar-nav .nav-item+.nav-item,
.navbar-nav .nav-link + .nav-link {
  margin-left: 0;
}
@media (min-width: 34em) {
  .navbar-brand {
    float: left;
    margin-right: 2rem;
  }
  .navbar-nav .nav-item {
    padding-top: .535rem;
    float: left;
  }
  .navbar-divider,
  .navbar-nav .nav-item + .nav-item,
  .navbar-nav .nav-link + .nav-link {

    margin-left: 2rem;
  }
}
@media (max-width: 34em) {
  .navbar-brand {
      display: block;
      height: 50px;
      padding: .55rem 0;
  }

}

.navbar-toggler {
    vertical-align:middle;
    padding: .7rem .7rem;
    margin: .5rem .25rem;
    background-color: transparent;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

.navbar-toggler {
    border-color: #ddd;
}
.navbar-toggler:focus, .navbar-toggler:hover {
    background-color: #ddd;
}
.navbar-toggler .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
}
.navbar-toggler .icon-bar {
    background-color: #888;
}
.navbar-toggler .icon-bar+.icon-bar {
    margin-top: 4px;
}</pre><p></p>
<p>That&#8217;s it! You can play around with the navbar height and padding to adjust your menu if using different base sizes. Your menus now should act and look similar to Bootstrap 3. </p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/04/03/bootstrap-4-mobile-menu/">Bootstrap 4 Mobile Menu &#8211; Collapsible Nav</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/04/03/bootstrap-4-mobile-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">957</post-id>	</item>
		<item>
		<title>How to Get Followers on Twitter</title>
		<link>https://www.jeffmould.com/2016/03/31/how-to-get-followers-on-twitter/</link>
				<comments>https://www.jeffmould.com/2016/03/31/how-to-get-followers-on-twitter/#respond</comments>
				<pubDate>Thu, 31 Mar 2016 18:38:00 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[crowdfire]]></category>
		<category><![CDATA[followers]]></category>
		<category><![CDATA[hootsuite]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[justunfollow]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=931</guid>
				<description><![CDATA[<p>Clients often ask me for the advice on getting started with Twitter and, more importantly, how to get followers on Twitter. Unfortunately, unless you are a celebrity, a Fortune 500 CEO, or major brand, growing you Twitter following is going to be a relentless process and is not going to happen overnight. Once you get the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/03/31/how-to-get-followers-on-twitter/">How to Get Followers on Twitter</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<div id="attachment_943" style="width: 910px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-943" class="size-full wp-image-943" title="How to Get Followers on Twitter" src="http://www.jeffmould.com/wp-content/uploads/2016/03/twitter-logo.png" alt="How to Get Followers on Twitter" width="900" height="386" srcset="https://www.jeffmould.com/wp-content/uploads/2016/03/twitter-logo.png 900w, https://www.jeffmould.com/wp-content/uploads/2016/03/twitter-logo-150x64.png 150w, https://www.jeffmould.com/wp-content/uploads/2016/03/twitter-logo-300x129.png 300w, https://www.jeffmould.com/wp-content/uploads/2016/03/twitter-logo-768x329.png 768w" sizes="(max-width: 900px) 100vw, 900px" /><p id="caption-attachment-943" class="wp-caption-text">How to Get Followers on Twitter</p></div>
<p>Clients often ask me for the advice on getting started with Twitter and, more importantly, how to get followers on Twitter. Unfortunately, unless you are a celebrity, a Fortune 500 CEO, or major brand, growing you Twitter following is going to be a relentless process and is not going to happen overnight. Once you get the hang of Twitter, and all the little Twitter tricks (i.e. @replies, # hashtags, DM, etc..), it can be a powerful tool for not only communicating with others, but generating leads, identifying job opportunities, and even landing jobs. </p>
<p>Once you create a Twitter account though, the next question you will probably ask yourself is <strong>how to get followers on Twitter</strong>. I am assuming that you want to have a large number of followers reading and interacting with your content. If you don&#8217;t, and want to keep a small group of people that you interact with, well there is nothing wrong with that approach either. Either way, you will probably wonder what the best way to build your audience and get followers on Twitter is going to be for you.</p>
<h2>So How Do You Get Followers on Twitter?</h2>
<p><strong>Start with your Twitter bio &amp; profile picture</strong>. The first, and probably most important tip, is to add a bio and profile picture. One of the main themes that you will see through all the following tips, is to avoid coming off as a spammer or a robot. This starts with your bio and your profile picture. Tell a little about yourself. Your interests, hobbies, and link to your website or blog if you have one. Include hashtags in your bio to allow people to find it easier when searching Twitter. Try to use a real photo of yourself if you can.</p>
<p><strong>Find like minded individuals</strong>. The easiest way to start is to follow people you already know. Your Facebook friends, your LinkedIn connections, your email contacts, etc&#8230; People that you have existing relationships with.</p>
<p>This is is good for two reasons. First, it is a quick way to start following people who you already interact with. Second, hopefully these people will follow you back, giving you an initial boost to your own follower count. </p>
<p>To help address spam accounts, Twitter uses an algorithm that prevents users from following large numbers of other users without having a comparable follower count. I am sure there are other pieces to the algorithm, such as the number of tweets you send and how you interact with the platform. Twitter does not disclose the exact algorithm.</p>
<p>When choosing who to follow I like to think of three groups of followers. The first group is people I am friends with or have an existing relationship with. These are the most important to me and I do my best to interact with them on a regular basis, as well as enjoy reading their tweets/content.</p>
<p>The second group, is people whose content I enjoy reading or whose tweets I find interesting. These are people that I follow solely to stay on top of the content they are producing.</p>
<p>The third group is the &#8220;everyone else&#8221; group. These may have followed me themselves, they may be followers of people I already follow, or they may be suggested people to follow. I may have come across one of their tweets, found it interesting, followed them, but lost track over time. These are also people that Twitter suggested I follow or people who follow people I follow.</p>
<p><strong>Research who the followers of the people you follow, your own followers and who they follow and who follows them</strong>. Once you start get</p>
<p><strong>Use Twitter suggestions</strong>. One of the nice features of Twitter is it will make suggestions of people you should follow. It does this two (2) ways. First on the right hand side of the screen when you are logged in, you will see a list of &#8220;Who to Follow&#8221;.  The second way is you will get occasional emails from Twitter of suggested users to follow based on how you interact. </p>
<p><strong>Tweet regularly</strong>. Set up Google Alerts for the type of content that interests you. When you get notifications from Google of new content read them over and if you think they are useful share the articles with your Twitter followers. Use tools like <a href="http://buffer.com" target="_blank" rel="nofollow">Buffer</a> to tweet even when you aren&#8217;t around.</p>
<p><strong>Groom your follower/following list</strong>. This can be useful when you are just getting started, but as your follower/following counts grow, it becomes less critical. As I said above, Twitter has an algorithm that utilizes a follower/following ratio when determining a limit on how many people you are able to follow. When you are just getting started if you begin to follow a large number of people without having people following you back you may eventually run into this roadblock. To keep the ratio in check as you are starting out, you can use tools like <a href="http://justunfollow.com" target="_blank" rel="nofollow">JustUnfollow</a> to find people who don&#8217;t follow you back, who follow you and then unfollow you, and generally see how your followers interact with you.</p>
<p>The more people you follow on Twitter, the more the noise ratio increases in your timeline. Grooming the list of people you follow from time to time can help make people who matter most to you, and their tweets, stand out. By grooming your list, I am referring to unfollowing people who may not have followed you back, who appear spammy, or who you just lost interest in their content. This is where segmenting you list into user types, as I pointed out above, can be useful. When grooming your list, you probably don&#8217;t want to unfollow friends or business associates, but that random user followed based on a Twitter suggestion can probably be unfollowed.</p>
<p><strong>Touch your new followers</strong>. No not literally touch them. Keeping with our theme, you don&#8217;t want to appear as a robot. When someone follows you thank them or interact in some way. I prefer to use a tweet directly to the person (although I am not as good at this as I should be with my personal Twitter account) thanking them for following and pointing them to my blog. Some people use automated DMs to thank people. I am not a big fan of these. To me this comes across as spam in many instances. A simple tweet is effective enough, plus it helps open the opportunity to start a conversation.</p>
<p><strong>Remember that Twitter is a 2-Way communication tool</strong>. If someone responds to your tweet, respond back. If someone tweets something you like, like the tweet, retweet it, and/or comment back to them. Interact with people you don&#8217;t know.  </p>
<p><strong>Start a blog</strong>. Creating content of your own is important. While you can easily share other people&#8217;s content, having your own content to share puts the spotlight on you. Your own content gives your followers something they can share. This works to draw attention not only to your Twitter account, but to your blog itself. </p>
<p><strong>Don&#8217;t buy followers</strong>. I can&#8217;t stress this enough! While the initial burst can help you around Twitter algorithms, it does neither you or your audience any good. This is different than using Twitter ads for reaching new followers. There are many companies across the Internet that will offer to &#8220;sell&#8221; you &#8220;thousands&#8221; of followers. Not only are you wasting your money in most cases, the majority of followers they will sell you are &#8220;spam&#8221; accounts. These accounts provide no value to you and only clutter the Twitter platform. Don&#8217;t waste your money. </p>
<p><strong>Use hashtags and @mention</strong>. Hashtags are important for getting your content noticed. Use Twitter search and trends to find hashtags that interest you. When you tweet be sure to try and include a hashtag. Your tweets will get more views and engagement, resulting in more followers. Also, if you think another user will enjoy a tweet, include them in your tweet, by @mention their user name. </p>
<p><strong>Link to your Twitter account</strong>. Have a blog? Use YouTube? Have a Facebook account? Put links to your Twitter account anywhere you can. Use Follow buttons on your blog and make sure you tweet out any new content you put on your blog. If you can include your Twitter username on your business cards, do so.</p>
<p><strong>It takes time</strong>! This is not an overnight process. Initially you should plan to dedicate at least a few hours each week to growing your Twitter followers. You should eventually try to get into the habit of tweeting at least once or twice a day. Using tools like Buffer can ensure you are always sharing content with users. </p>
<p>Will these tips guarantee you will have millions of followers? Maybe or maybe not. Depends on how much time and effort you dedicate to growing your follower list and what your goals are. Some people see high follower counts as a &#8220;status&#8221; symbol.  It really comes down to what your goals for using Twitter are. If you are trying to build leads and generate business, you are probably going to want a larger audience. If you are looking to keep your conversation more intimate with a smaller group of followers, you will want to groom your list appropriately. Regardless over time you will see your follower count grow and become more engaging.</p>
<p>Many people are scared away from Twitter because initially it can appear as a black hole to your tweets. But once you start tweeting regularly and interacting with other users you will realize how valuable a tool Twitter can be to your business. Hopefully this article will help you get followers on Twitter and increase the value of your Twitter experience.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/03/31/how-to-get-followers-on-twitter/">How to Get Followers on Twitter</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/03/31/how-to-get-followers-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">931</post-id>	</item>
		<item>
		<title>Site Feedback Responses</title>
		<link>https://www.jeffmould.com/2016/03/25/site-feedback-responses/</link>
				<comments>https://www.jeffmould.com/2016/03/25/site-feedback-responses/#respond</comments>
				<pubDate>Fri, 25 Mar 2016 04:19:31 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jeff mould]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=928</guid>
				<description><![CDATA[<p>Tonight I was doing some maintenance on the blog here and came across a spam folder that contained a significant amount of contact form &#8220;spam&#8221;. Unfortunately, the majority of the messages were not spam and were in fact contact requests from you all. Over the next few days I will try to follow-up with everyone, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/03/25/site-feedback-responses/">Site Feedback Responses</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>Tonight I was doing some maintenance on the blog here and came across a spam folder that contained a significant amount of contact form &#8220;spam&#8221;. Unfortunately, the majority of the messages were not spam and were in fact contact requests from you all. Over the next few days I will try to follow-up with everyone, but I wanted to apologize for the error. I fixed the issue now so response times should be much better. So if you contacted me using the contact form, know that I will be following up with you in the week.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/03/25/site-feedback-responses/">Site Feedback Responses</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/03/25/site-feedback-responses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">928</post-id>	</item>
		<item>
		<title>Exclude Subdirectory from Routing in Laravel 5</title>
		<link>https://www.jeffmould.com/2016/02/21/exclude-subdirectory-laravel5-routing/</link>
				<comments>https://www.jeffmould.com/2016/02/21/exclude-subdirectory-laravel5-routing/#comments</comments>
				<pubDate>Sun, 21 Feb 2016 15:18:37 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Laravel 5]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[laravel5]]></category>
		<category><![CDATA[nginx.conf]]></category>
		<category><![CDATA[permalinks]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=907</guid>
				<description><![CDATA[<p>In this article I am going to explain how to exclude a subdirectory from routing in Laravel 5. Let&#8217;s say, for example, you have a Laravel 5 application installed at http://www.example.com and you wish to install a WordPress blog in the subdirectory http://www.example.com/blog. Unfortunately it is not as simple as just creating subdirectory under Laravel 5 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/02/21/exclude-subdirectory-laravel5-routing/">Exclude Subdirectory from Routing in Laravel 5</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>In this article I am going to explain how to exclude a subdirectory from routing in <a href="http://laravel.com" target="_blank">Laravel 5</a>. Let&#8217;s say, for example, you have a <strong>Laravel 5</strong> application installed at <em>http://www.example.com</em> and you wish to install a <a href="http://www.wordpress.org" target="_blank">WordPress</a> blog in the subdirectory http://www.example.com/blog. Unfortunately it is not as simple as just creating subdirectory under Laravel 5 and assuming it will all work properly. You will need to make a few edits to you NGINX configuration files (Please note that this article assumes you are running NGINX on your server. This can still be done under Apache, you will just have to convert the rewrites to Apache.). Although my focus in this how-to will be on WordPress, the same steps could be taken to install any application (i.e. a forum) to run in a subdirectory of a Laravel 5 application.</p>
<p>It is important to note that WordPress may appear to function properly after a base install, if you enable <strong>permalinks</strong> on your WordPress install you will begin to see issues with Laravel attempting to route WordPress requests.</p>
<h2>How to Install WordPress in a Subdirectory of Laravel 5</h2>
<h3>Create subdirectory</h3>
<p>First things first, we need to create a subdirectory for our WordPress installation. We will need to create this subdirectory under the Laravel public directory. So your directory structure may look something like this (it doesn&#8217;t really matter, as long as the subdirectory you create is under the public directory in Laravel):</p><pre class="crayon-plain-tag">/usr/share/nginx/laravel/public/blog</pre><p></p>
<h3>Edit nginx.conf file</h3>
<p>For purposes of this article I am making two assumptions. First, that you are running NGINX as I stated above. Second, that you already have Laravel installed and working properly on your server. With that in mind we need to make a couple simple edits to your nginx.conf file (or wherever you have your configuration stored for the site you are working on):</p><pre class="crayon-plain-tag">server {
    listen 80;

    server_name example.com;

    root /usr/share/nginx/example.com/public/;
    index index.php index.html index.htm;

    #WORDPRESS PORTION

    location /blog/index.php(/.*)?$ {        
        fastcgi_split_path_info ^(/blog/index.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_read_timeout 1000;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        include fastcgi_params;
    }
    location /blog/ { 
        if (!-e $request_filename) {
                rewrite ^.*$ /blog/index.php last;    
            }
        try_files $uri $uri/ blog/index.php?args; 
    }
    
    #LARAVEL PORTION
    
    #if you currently have the if...then statement you see below, you will want to wrap
    #it in the location statement so as to prevent Laravel from attempting to route
    #WordPress permalinks.
    location / {
       if (!-e $request_filename)
       {
          rewrite ^/(.*)$ /index.php?/$1 last;
          break;
       }
    }
    
    # pass php scripts to php-fpm
    location ~ \.php(.*)$ {
       fastcgi_pass unix:/var/run/php5-fpm.sock;
       try_files $uri $uri/ /index.php?q=$uri&amp;args =404;
       fastcgi_split_path_info ^(.+\.php)(/.+)$;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       include fastcgi_params;
    }
}</pre><p>Now your configuration file may look slightly different, and include other directives (i.e. gzip, ignore files, logging configs, etc..), but the general idea is you are going to have four (4) location settings at least. Two for the Laravel installation and two for the WordPress installation. Often times, for a standard Laravel configuration you will find the <em>if&#8230;then</em> statement is outside of a location. It is important to note that we have moved it to inside a location for the root of the site. If we don&#8217;t do this, you will still be able to get to the /blog URL, however, if you enable permalinks for WordPress you will find that they do not work, and Laravel attempts to handle routing instead.</p>
<p>Once you have updated your configuration file, you simply need to restart NGINX and you will be off and running.</p>
<p>If you are looking for a more in-depth article about utilizing WordPress code within Laravel, for example if you want to use the WordPress admin as a CMS to your Laravel frontend, the following article is a great resource: <a href="http://blog.jgrossi.com/2014/working-with-laravel-4-and-wordpress-together/#laravel5" target="_blank">Working with Laravel 4 or 5 and WordPress Together</a></p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/02/21/exclude-subdirectory-laravel5-routing/">Exclude Subdirectory from Routing in Laravel 5</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/02/21/exclude-subdirectory-laravel5-routing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">907</post-id>	</item>
		<item>
		<title>How to fix JQuery Steps Plugin saveState not working</title>
		<link>https://www.jeffmould.com/2016/02/14/jquery-steps-plugin-savestate-js-cookie/</link>
				<comments>https://www.jeffmould.com/2016/02/14/jquery-steps-plugin-savestate-js-cookie/#comments</comments>
				<pubDate>Sun, 14 Feb 2016 19:14:34 +0000</pubDate>
		<dc:creator><![CDATA[Jeff Mould]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jeff mould]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[jquery cookie]]></category>
		<category><![CDATA[jquery-cookies]]></category>
		<category><![CDATA[jquery-steps]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[js-cookie]]></category>
		<category><![CDATA[saveState]]></category>

		<guid isPermaLink="false">http://www.jeffmould.com/?p=900</guid>
				<description><![CDATA[<p>I have found one of the better JQuery wizard builders available is JQuery-Steps.js. Unfortunately the latest version of JQuery Steps does not support the newer versions of js-cookie.js when saveState is set to true. This can be frustrating if you do not initially realize the saveState problem is directly related to the version of js-cookie.js [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/02/14/jquery-steps-plugin-savestate-js-cookie/">How to fix JQuery Steps Plugin saveState not working</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></description>
								<content:encoded><![CDATA[<p>I have found one of the better JQuery wizard builders available is <a href="http://www.jquery-steps.com/" target="_blank">JQuery-Steps.js</a>. Unfortunately the latest version of <strong>JQuery Steps</strong> does not support the newer versions of <a href="https://github.com/js-cookie/js-cookie" target="_blank">js-cookie.js</a> when <strong><em>saveState</em></strong> is set to true. This can be frustrating if you do not initially realize the <em>saveState</em> problem is directly related to the version of <em>js-cookie.js</em> you are using. In the meantime, you will not see errors being returned in the console, the only issue is that when you navigate away from the wizard, and then return, your state is not saved. While it is true you could probably get away with using the older version of <em>jquery-cookie.js</em>, why risk it, especially if your application already utilizes the newer version. Fortunately this is a quick and easy fix, and while we are at we will add an extra option to set the cookie expiration.</p>
<h2>Fixing the saveState issue in  JQuery-Steps.js with the latest version of js-cookie.js:</h2>
<p>First, make sure you download and include the latest version of js-cookie.js from here:</p>
<p><a href="https://github.com/js-cookie/js-cookie" target="_blank">https://github.com/js-cookie/js-cookie</a></p>
<p>Next we are going to make some edits to the jquery-steps.js file:</p>
<p>On, or about <em>Line 1868</em> we are going to add an option for <em><strong>cookieExpires</strong></em> after <em>saveState</em>:</p><pre class="crayon-plain-tag">/**
     * Saves the current state (step position) to a cookie.
     * By coming next time the last active step becomes activated.
     *
     * @property saveState
     * @type Boolean
     * @default false
     * @for defaults
     **/
    saveState: false,
    cookieExpires: 1,</pre><p><strong>Note that the cookieExpires is in number of days. </strong></p>
<p>Next, on or about <em>Line 168</em> we are going to edit the code to utilize the new <em><strong>Cookies</strong></em> function (note that I have included the old code commented out as a reference for you):</p><pre class="crayon-plain-tag">/* OLD
    // Tries to load the saved state (step position)
    if (options.saveState &amp;&amp; $.cookie)
    {
        var savedState = $.cookie(_cookiePrefix + getUniqueId(wizard));
        // Sets the saved position to the start index if not undefined or out of range 
        var savedIndex = parseInt(savedState, 0);
        if (!isNaN(savedIndex) &amp;&amp; savedIndex &lt; state.stepCount)
        {
            startIndex = savedIndex;
        }
    }
    */

    if (options.saveState &amp;&amp; window.Cookies)
    {
        var savedState = Cookies.get(_cookiePrefix + getUniqueId(wizard));
        // Sets the saved position to the start index if not undefined or out of range 
        var savedIndex = parseInt(savedState, 0);
        if (!isNaN(savedIndex) &amp;&amp; savedIndex &lt; state.stepCount)
        {
            startIndex = savedIndex;
        }
    }</pre><p>Finally, we are going to down to Line 1189 and make the following edits to save the new cookie (again you will note the old code for reference, you can remove anything old in your code, I just included it to make it easier to see the changes):</p><pre class="crayon-plain-tag">/**
 * Saves the current state to a cookie.
 *
 * @static
 * @private
 * @method saveCurrentStateToCookie
 * @param wizard {Object} A jQuery wizard object
 * @param options {Object} Settings of the current wizard
 * @param state {Object} The state container of the current wizard
 */
function saveCurrentStateToCookie(wizard, options, state)
{
    if (options.saveState &amp;&amp; window.Cookies)
    {
        Cookies.set(_cookiePrefix + getUniqueId(wizard), state.currentIndex, { expires: options.cookieExpires });
    }
    /* OLD
    if (options.saveState &amp;&amp; $.cookie)
    {
        $.cookie(_cookiePrefix + getUniqueId(wizard), state.currentIndex);
    }
    */
}</pre><p>That&#8217;s all there is to it. You can save this new file and include it in your application. <em>JQuery-Steps</em> will now utilize the <em>js-cookies.js</em> functions to <em>saveState</em>.</p>
<p>The post <a rel="nofollow" href="https://www.jeffmould.com/2016/02/14/jquery-steps-plugin-savestate-js-cookie/">How to fix JQuery Steps Plugin saveState not working</a> appeared first on <a rel="nofollow" href="https://www.jeffmould.com">Jeff Mould</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://www.jeffmould.com/2016/02/14/jquery-steps-plugin-savestate-js-cookie/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">900</post-id>	</item>
	</channel>
</rss>
