ALPHA 3.0.2

This commit is contained in:
TheGamecraft
2018-09-05 11:35:41 -04:00
parent 4dbdc8fd19
commit 8ef8057bfa
771 changed files with 9284 additions and 5857 deletions

View File

@@ -35,7 +35,7 @@ class Response
/**
* Get the string representation of the message.
*
* @return string
* @return string|null
*/
public function __toString()
{

0
vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php vendored Normal file → Executable file
View File

View File

View File

@@ -4,6 +4,7 @@ namespace Illuminate\Auth;
use Illuminate\Support\Str;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
@@ -110,7 +111,13 @@ class DatabaseUserProvider implements UserProvider
$query = $this->conn->table($this->table);
foreach ($credentials as $key => $value) {
if (! Str::contains($key, 'password')) {
if (Str::contains($key, 'password')) {
continue;
}
if (is_array($value) || $value instanceof Arrayable) {
$query->whereIn($key, $value);
} else {
$query->where($key, $value);
}
}

View File

@@ -4,6 +4,7 @@ namespace Illuminate\Auth;
use Illuminate\Support\Str;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Contracts\Auth\Authenticatable as UserContract;
@@ -113,7 +114,13 @@ class EloquentUserProvider implements UserProvider
$query = $this->createModel()->newQuery();
foreach ($credentials as $key => $value) {
if (! Str::contains($key, 'password')) {
if (Str::contains($key, 'password')) {
continue;
}
if (is_array($value) || $value instanceof Arrayable) {
$query->whereIn($key, $value);
} else {
$query->where($key, $value);
}
}

0
vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php vendored Normal file → Executable file
View File

View File

View File

View File

View File

@@ -84,7 +84,7 @@ class PusherBroadcaster extends Broadcaster
*/
protected function decodePusherResponse($request, $response)
{
if (! $request->callback) {
if (! $request->input('callback', false)) {
return json_decode($response, true);
}

0
vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php vendored Normal file → Executable file
View File

View File

View File

View File

0
vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/FileStore.php vendored Normal file → Executable file
View File

View File

0
vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/NullStore.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/Repository.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cache/composer.json vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Config/composer.json vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Console/Application.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Console/Command.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Console/composer.json vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Container/Container.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Container/composer.json vendored Normal file → Executable file
View File

View File

View File

View File

View File

View File

0
vendor/laravel/framework/src/Illuminate/Contracts/View/Engine.php vendored Normal file → Executable file
View File

0
vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php vendored Normal file → Executable file
View File

View File

0
vendor/laravel/framework/src/Illuminate/Cookie/composer.json vendored Normal file → Executable file
View File

View File

2
vendor/laravel/framework/src/Illuminate/Database/Connection.php vendored Normal file → Executable file
View File

@@ -929,7 +929,7 @@ class Connection implements ConnectionInterface
return $this->getPdo();
}
if ($this->getConfig('sticky') && $this->recordsModified) {
if ($this->recordsModified && $this->getConfig('sticky')) {
return $this->getPdo();
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -35,9 +35,15 @@ class FreshCommand extends Command
return;
}
$this->dropAllTables(
$database = $this->input->getOption('database')
);
$database = $this->input->getOption('database');
if ($this->option('drop-views')) {
$this->dropAllViews($database);
$this->info('Dropped all views successfully.');
}
$this->dropAllTables($database);
$this->info('Dropped all tables successfully.');
@@ -65,6 +71,19 @@ class FreshCommand extends Command
->dropAllTables();
}
/**
* Drop all of the database views.
*
* @param string $database
* @return void
*/
protected function dropAllViews($database)
{
$this->laravel['db']->connection($database)
->getSchemaBuilder()
->dropAllViews();
}
/**
* Determine if the developer has requested database seeding.
*
@@ -100,6 +119,8 @@ class FreshCommand extends Command
return [
['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],
['drop-views', null, InputOption::VALUE_NONE, 'Drop all tables and views.'],
['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],
['path', null, InputOption::VALUE_OPTIONAL, 'The path to the migrations files to be executed.'],

View File

View File

View File

View File

View File

View File

@@ -124,6 +124,13 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
*/
protected static $globalScopes = [];
/**
* The list of models classes that should not be affected with touch.
*
* @var array
*/
protected static $ignoreOnTouch = [];
/**
* The name of the "created at" column.
*
@@ -215,6 +222,54 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
static::$globalScopes = [];
}
/**
* Disables relationship model touching for the current class during given callback scope.
*
* @param callable $callback
* @return void
*/
public static function withoutTouching(callable $callback)
{
static::withoutTouchingOn([static::class], $callback);
}
/**
* Disables relationship model touching for the given model classes during given callback scope.
*
* @param array $models
* @param callable $callback
* @return void
*/
public static function withoutTouchingOn(array $models, callable $callback)
{
static::$ignoreOnTouch = array_values(array_merge(static::$ignoreOnTouch, $models));
try {
call_user_func($callback);
} finally {
static::$ignoreOnTouch = array_values(array_diff(static::$ignoreOnTouch, $models));
}
}
/**
* Determine if the given model is ignoring touches.
*
* @param string|null $class
* @return bool
*/
public static function isIgnoringTouch($class = null)
{
$class = $class ?: static::class;
foreach (static::$ignoreOnTouch as $ignoredClass) {
if ($class === $ignoredClass || is_subclass_of($class, $ignoredClass)) {
return true;
}
}
return false;
}
/**
* Fill the model with an array of attributes.
*

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -161,9 +161,13 @@ abstract class Relation
*/
public function touch()
{
$column = $this->getRelated()->getUpdatedAtColumn();
$model = $this->getRelated();
$this->rawUpdate([$column => $this->getRelated()->freshTimestampString()]);
if (! $model::isIgnoringTouch()) {
$this->rawUpdate([
$model->getUpdatedAtColumn() => $model->freshTimestampString(),
]);
}
}
/**

0
vendor/laravel/framework/src/Illuminate/Database/Grammar.php vendored Normal file → Executable file
View File

View File

View File

View File

@@ -61,7 +61,7 @@ class MigrationCreator
// Next, we will fire any hooks that are supposed to fire after a migration is
// created. Once that is done we'll be ready to return the full path to the
// migration file so it can be used however it's needed by the developer.
$this->firePostCreateHooks();
$this->firePostCreateHooks($table);
return $path;
}
@@ -150,12 +150,13 @@ class MigrationCreator
/**
* Fire the registered post create hooks.
*
* @param string $table
* @return void
*/
protected function firePostCreateHooks()
protected function firePostCreateHooks($table)
{
foreach ($this->postCreate as $callback) {
call_user_func($callback);
call_user_func($callback, $table);
}
}

View File

View File

View File

View File

View File

View File

0
vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php vendored Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More