title: Laravel small standalone one-off script without artisan command?
body: <p>I need to check something small in Laravel, so I just want to make a small script to check it.</p>
  
  <p>I know that I can do it with </p>
  
  <pre><code>php artisan make:console ...
  </code></pre>
  
  <p>But It will add a file to the App/Console/Command, and I will need to update app/Console/Kernel.php. It means that I will have do commit it to source control, which is really not needed.</p>
  
  <p>Is there a way to have a <strong>standalone</strong> laravel script which will give me access to the Laravel Components? </p>
  
  <p>I am using Laravel 5.2, (make:command doesn't exists, only make:console)</p>
  
  <p>Just an example for what I tried:</p>
  
  <pre><code>&lt;?php
  
  use App\User;
  use DB;
  
  require __DIR__.'/../vendor/autoload.php';
  require __DIR__.'/..//bootstrap/app.php';
  
  echo "hello world\n";
  $res=User::where('id',5)-&gt;first();
  echo "end!\n";
  ?&gt;
  </code></pre>
  
  <p>But I am getting an error:</p>
  
  <pre><code>PHP Fatal error:  Uncaught Error: Call to a member function connection() on null in /var/www/html/dpriceit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:3314
  Stack trace:
  #0 /var/www/html/dpriceit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3280): Illuminate\Database\Eloquent\Model::resolveConnection(NULL)
  #1 /var/www/html/dpriceit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1880): Illuminate\Database\Eloquent\Model-&gt;getConnection()
  #2 /var/www/html/dpriceit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1853): Illuminate\Database\Eloquent\Model-&gt;newBaseQueryBuilder()
  #3 /var/www/html/dpriceit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1823): Illuminate\Database\Eloquent\Model-&gt;newQueryWithoutScopes()
  #4 /var/www/html/dpriceit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3524): Illuminate\Database\Eloquent\Model-&gt;newQuery()
  </code></pre>
  
  <h2>UPDATE</h2>
  
  <p>I tried creating a console command</p>
  
  <pre><code>php artisan make:console MyTempTest
  </code></pre>
  
  <p>But when I do <code>php artisan list</code> I don't see its signature in the list of available commands. </p>