Forgive yourself for your mistakes and move on

Forgive yourself for your mistakes and move on. We all are humans and we do mistakes but regretting about old mistakes won't help. Take care of the present moments don't stress about past and future. And once you take care of your present the future will take care of itself!

Sometimes i am not me sometimes you are not you it's just the situations and timings which makes us do crazy things.

Sometimes I'm not me sometimes you are not you it's just the situations and timings which makes us do crazy things.

We do have some relationships where we get angry on things which is not supposed to be angry on but we do! And it's natural at that time I am not me means I'm not in control it just flows. Sometimes you get angry and say things at my face but at that time you're not you! You are better than that and I'm better that that!

A team aligned behind a vision will move mountains

A team aligned behind a vision will move mountains             — Kevin Rose

Do one thing everyday that scares you!

Let it flow let it go!

In life we experience some worst situations & we don't welcome them at that time but later on we realize that it helps us in becoming our greatest version.

These situations makes us that much strong that we can easily ignore & face many problems which are too big for some people. So always be grateful, don't resist & let the things flow!

Deploying Laravel Application to Shared Hosting

I added this article to Stackoverflow Laravel Documentation, i thought it would be great if it is in my blog too. Deploying Laravel Project to Shared Hosting is easy.
image-is-100-percent-not-related-to-the-topic

Requirements:

  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • First of all archive/zip/compress your project file
  • Now Let say you have shared hosting server and you want to deploy your laravel project / app there. In your Hosting cPanel click on Filemanager it will lead you to another page where you can find the directory/folder called public_html .
  • Upload the compressed project file to public_html directory and extract it
  • Now you can move all your project files to public_html ( just select all project files and click on move, it will pops up a box enter public_html there )
  • Now in cPanel you can find MySQL Databases, Create Database, database user and password plus assign user to your created database in there.
  • After creating database, in cPanel Click on PhpMyAdmin and Select the database you have created. Import the .sql file from your local PhpMyAdmin.
  • Once importing is done, Visit public_html directory and edit .env file
  • In .env change the following lines accordingly
DB_DATABASE=yourdatabaseName
DB_USERNAME=databaseUsername
DB_PASSWORD=databasePassword
Save the .env file and now visit yourwebsite.com/public and your project will dance there.
BUT what if i want don't want /public in my website, i.e i want to run my application on my website root (website.com) for that do the following steps.
Copy all the /public directory files to root directory, and edit index.php.
Change
require __DIR__.'/../bootstrap/autoload.php';
And for LARAVEL 5.5+ Users Change the below
require __DIR__.'/../vendor/autoload.php'; TO the below
require __DIR__.'/vendor/autoload.php';
To
require __DIR__.'/bootstrap/autoload.php';
And
$app = require_once __DIR__.'/../bootstrap/app.php';
To
$app = require_once __DIR__.'/bootstrap/app.php';
Once that is done, in server.php change
 if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
    return false;
}
To
if ($uri !== '/' && file_exists(__DIR__.'/'.$uri)) {
    return false;
}
And
require_once __DIR__.'/public/index.php';
To

require_once __DIR__.'/index.php';

Life tip

Sometimes all you need is to remove someone from your life, then your life become easier.