diff --git a/.env.example b/.env.example index 72c19df3..57ea1e36 100644 --- a/.env.example +++ b/.env.example @@ -52,5 +52,3 @@ TWITTER_ACCESS_TOKEN_SECRET= SCOUT_DRIVER=pgsql PIWIK=false - -PSYSH_CONFIG=tinker.config.php diff --git a/.psysh.php b/.psysh.php new file mode 100644 index 00000000..d237947d --- /dev/null +++ b/.psysh.php @@ -0,0 +1,3 @@ +files()->name('*.php')->in(base_path().'/app'); - foreach ($finder as $file) { - $namespace = 'App\\'; - if ($relativePath = $file->getRelativePath()) { - $namespace .= strtr($relativePath, '/', '\\') . '\\'; - } - $class = $namespace . $file->getBasename('.php'); - try { - $r = new \ReflectionClass($class); - if ($r->isSubclassOf('Illuminate\\Database\\Eloquent\\Model')) { - class_alias($class, $file->getBasename('.php')); - } - } catch (Exception $e) { - // - } - } - } -} - -aliasModels(); - -return [ - 'startupMessage' => 'Using local config file (tinker.config.php)', - - 'commands' => [ - // new \App\Tinker\TestCommand, - ], -];