diff --git a/app/Console/Commands/InstallAppCommand.php b/app/Console/Commands/InstallAppCommand.php
index be14862c..db0f0f26 100644
--- a/app/Console/Commands/InstallAppCommand.php
+++ b/app/Console/Commands/InstallAppCommand.php
@@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
+use Illuminate\Support\Str;
use PDOException;
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
use Symfony\Component\Console\Question\Question;
@@ -217,7 +218,7 @@ protected function guessDatabaseName()
$segments = array_reverse(explode(DIRECTORY_SEPARATOR, app_path()));
$name = explode('.', $segments[1])[0];
- return str_replace('-', '_', str_slug($name));
+ return str_replace('-', '_', Str::slug($name));
} catch (Exception $e) {
return '';
}
diff --git a/app/Http/Responses/Backend/Blog/CreateResponse.php b/app/Http/Responses/Backend/Blog/CreateResponse.php
index 65a6e462..77cdeb79 100644
--- a/app/Http/Responses/Backend/Blog/CreateResponse.php
+++ b/app/Http/Responses/Backend/Blog/CreateResponse.php
@@ -7,7 +7,9 @@
class CreateResponse implements Responsable
{
protected $status;
+
protected $blogTags;
+
protected $blogCategories;
public function __construct($status, $blogCategories, $blogTags)
diff --git a/app/Http/Responses/Backend/Blog/EditResponse.php b/app/Http/Responses/Backend/Blog/EditResponse.php
index 3366375a..969ab3d2 100644
--- a/app/Http/Responses/Backend/Blog/EditResponse.php
+++ b/app/Http/Responses/Backend/Blog/EditResponse.php
@@ -7,8 +7,11 @@
class EditResponse implements Responsable
{
protected $blog;
+
protected $status;
+
protected $blogTags;
+
protected $blogCategories;
public function __construct($blog, $status, $blogCategories, $blogTags)
diff --git a/app/Http/Responses/RedirectResponse.php b/app/Http/Responses/RedirectResponse.php
index 898803a1..02098e7b 100644
--- a/app/Http/Responses/RedirectResponse.php
+++ b/app/Http/Responses/RedirectResponse.php
@@ -7,6 +7,7 @@
class RedirectResponse implements Responsable
{
protected $route;
+
protected $message;
public function __construct($route, $message)
diff --git a/app/Http/Utilities/Notification.php b/app/Http/Utilities/Notification.php
index 895ff621..78cd245e 100755
--- a/app/Http/Utilities/Notification.php
+++ b/app/Http/Utilities/Notification.php
@@ -18,9 +18,13 @@
abstract class Notification
{
protected $_message = null;
+
protected $_devices = null;
+
protected $_response = null;
+
protected $_body = null;
+
protected static $_url = null;
/*
diff --git a/app/Http/Utilities/NotificationIos.php b/app/Http/Utilities/NotificationIos.php
index a1e0c49d..edef630b 100755
--- a/app/Http/Utilities/NotificationIos.php
+++ b/app/Http/Utilities/NotificationIos.php
@@ -7,11 +7,15 @@ class NotificationIos extends Notification
const BADGE_ID = 0;
protected $_passPhrase = null; // for authentication of .pem file or password of .pem file
+
protected $_pemFile = null; // for send notificetion .pem file is must add in that code
+
protected static $_url = 'ssl://gateway.sandbox.push.apple.com:2195'; // url for send push message
const ERROR_PEM_NOTACCESSIBLE = 1; // exception error for file not get
+
const ERROR_PASSPHRASE_EMPTY = 2; // exception error for passphrese empty
+
const ERROR_CONNECTION_FAILED = 3; // exception error for connection failed
protected $sendNotification = 1; // exception error for connection failed
diff --git a/app/Http/Utilities/PushNotification.php b/app/Http/Utilities/PushNotification.php
index 269cbf42..b0bbbe4b 100755
--- a/app/Http/Utilities/PushNotification.php
+++ b/app/Http/Utilities/PushNotification.php
@@ -28,10 +28,12 @@ public function _pushNotification($msg, $type, $devicetoken)
return $this->_pushToIos($devicetoken, $msg);
return true;
+
break;
case 'android':
return $this->_pushToAndroid($devicetoken, $msg);
+
break;
default:
diff --git a/app/Models/Access/PasswordReset/PasswordReset.php b/app/Models/Access/PasswordReset/PasswordReset.php
index a2c49793..d3ca7699 100755
--- a/app/Models/Access/PasswordReset/PasswordReset.php
+++ b/app/Models/Access/PasswordReset/PasswordReset.php
@@ -10,7 +10,9 @@
class PasswordReset extends BaseModel
{
public $timestamps = false;
+
protected $table = 'password_resets';
+
protected $fillable = [
'email',
'token',
diff --git a/app/Models/Access/User/Traits/Attribute/UserAttribute.php b/app/Models/Access/User/Traits/Attribute/UserAttribute.php
index 8216082f..22a49b15 100755
--- a/app/Models/Access/User/Traits/Attribute/UserAttribute.php
+++ b/app/Models/Access/User/Traits/Attribute/UserAttribute.php
@@ -151,6 +151,7 @@ public function getStatusButtonAttribute($class)
return ''.$name.'';
}
+
break;
case 1:
@@ -159,6 +160,7 @@ public function getStatusButtonAttribute($class)
return ''.$name.'';
}
+
break;
default:
@@ -313,6 +315,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
$button = ($counter <= 3) ? $this->getShowButtonAttribute($class) : '
'
.$this->getShowButtonAttribute($class).
'';
+
break;
case 'edit-user':
$button = ($counter <= 3) ? $this->getEditButtonAttribute($class) : ''
@@ -321,6 +324,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
$button .= ($counter <= 3) ? $this->getChangePasswordButtonAttribute($class) : ''
.$this->getChangePasswordButtonAttribute($class).
'';
+
break;
case 'activate-user':
if (\Route::currentRouteName() == 'admin.access.user.deactivated.get') {
@@ -330,6 +334,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}
+
break;
case 'deactivate-user':
if (\Route::currentRouteName() == 'admin.access.user.get') {
@@ -339,6 +344,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}
+
break;
case 'delete-user':
if (access()->user()->id != $this->id) {
@@ -348,6 +354,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}
+
break;
case 'login-as-user':
if (access()->user()->id != $this->id) {
@@ -357,6 +364,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}
+
break;
case 'clear-user-session':
if (access()->user()->id != $this->id) {
@@ -366,9 +374,11 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}
+
break;
default:
$button = '';
+
break;
}
diff --git a/app/Models/Access/User/User.php b/app/Models/Access/User/User.php
index 250c000b..74dc4d15 100755
--- a/app/Models/Access/User/User.php
+++ b/app/Models/Access/User/User.php
@@ -25,6 +25,7 @@ class User extends Authenticatable
UserRelationship,
UserSendPasswordReset,
HasApiTokens;
+
/**
* The database table used by the model.
*
diff --git a/app/Notifications/Frontend/Auth/UserNeedsPasswordReset.php b/app/Notifications/Frontend/Auth/UserNeedsPasswordReset.php
index 12eabbc7..2ff4460b 100755
--- a/app/Notifications/Frontend/Auth/UserNeedsPasswordReset.php
+++ b/app/Notifications/Frontend/Auth/UserNeedsPasswordReset.php
@@ -12,6 +12,7 @@
class UserNeedsPasswordReset extends Notification
{
use Queueable;
+
/**
* The password reset token.
*
diff --git a/app/Notifications/PasswordReset.php b/app/Notifications/PasswordReset.php
index b133bb57..2f6b4492 100644
--- a/app/Notifications/PasswordReset.php
+++ b/app/Notifications/PasswordReset.php
@@ -16,6 +16,7 @@ class PasswordReset extends Notification
* @return void
*/
protected $user;
+
protected $token;
public function __construct($user, $token)
diff --git a/app/Repositories/Backend/Access/User/UserRepository.php b/app/Repositories/Backend/Access/User/UserRepository.php
index 6d5ee120..8d519d4e 100755
--- a/app/Repositories/Backend/Access/User/UserRepository.php
+++ b/app/Repositories/Backend/Access/User/UserRepository.php
@@ -306,10 +306,12 @@ public function mark($user, $status)
switch ($status) {
case 0:
event(new UserDeactivated($user));
+
break;
case 1:
event(new UserReactivated($user));
+
break;
}
diff --git a/app/Repositories/Backend/Blogs/BlogsRepository.php b/app/Repositories/Backend/Blogs/BlogsRepository.php
index c502da90..d4622938 100755
--- a/app/Repositories/Backend/Blogs/BlogsRepository.php
+++ b/app/Repositories/Backend/Blogs/BlogsRepository.php
@@ -15,6 +15,7 @@
use Carbon\Carbon;
use DB;
use Illuminate\Support\Facades\Storage;
+use Illuminate\Support\Str;
/**
* Class BlogsRepository.
@@ -73,7 +74,7 @@ public function create(array $input)
unset($input['tags'], $input['categories']);
DB::transaction(function () use ($input, $tagsArray, $categoriesArray) {
- $input['slug'] = str_slug($input['name']);
+ $input['slug'] = Str::slug($input['name']);
$input['publish_datetime'] = Carbon::parse($input['publish_datetime']);
$input = $this->uploadImage($input);
$input['created_by'] = access()->user()->id;
@@ -110,7 +111,7 @@ public function update(Blog $blog, array $input)
$categoriesArray = $this->createCategories($input['categories']);
unset($input['tags'], $input['categories']);
- $input['slug'] = str_slug($input['name']);
+ $input['slug'] = Str::slug($input['name']);
$input['publish_datetime'] = Carbon::parse($input['publish_datetime']);
$input['updated_by'] = access()->user()->id;
diff --git a/app/Repositories/Backend/History/EloquentHistoryRepository.php b/app/Repositories/Backend/History/EloquentHistoryRepository.php
index ff713046..0f2e4564 100755
--- a/app/Repositories/Backend/History/EloquentHistoryRepository.php
+++ b/app/Repositories/Backend/History/EloquentHistoryRepository.php
@@ -243,18 +243,22 @@ public function renderDescription($text, $assets = false)
switch (count($values)) {
case 1:
$text = str_replace('{'.$key.'}', link_to_route($values[0], $values[0]), $text);
+
break;
case 2:
$text = str_replace('{'.$key.'}', link_to_route($values[0], $values[1]), $text);
+
break;
case 3:
$text = str_replace('{'.$key.'}', link_to_route($values[0], $values[1], $values[2]), $text);
+
break;
case 4:
$text = str_replace('{'.$key.'}', link_to_route($values[0], $values[1], $values[2], $values[3]), $text);
+
break;
}
} else {
@@ -266,6 +270,7 @@ public function renderDescription($text, $assets = false)
case 'string':
$text = str_replace('{'.$key.'}', $values, $text);
+
break;
}
diff --git a/app/Repositories/Backend/Notification/NotificationRepository.php b/app/Repositories/Backend/Notification/NotificationRepository.php
index bbbe6454..c50b36fb 100755
--- a/app/Repositories/Backend/Notification/NotificationRepository.php
+++ b/app/Repositories/Backend/Notification/NotificationRepository.php
@@ -18,6 +18,7 @@ class NotificationRepository extends BaseRepository
* @var object
*/
public $model;
+
public $timestamps = false;
public function __construct(Notification $model)
diff --git a/app/Repositories/Backend/Pages/PagesRepository.php b/app/Repositories/Backend/Pages/PagesRepository.php
index 42190754..deb89bd2 100644
--- a/app/Repositories/Backend/Pages/PagesRepository.php
+++ b/app/Repositories/Backend/Pages/PagesRepository.php
@@ -8,6 +8,7 @@
use App\Exceptions\GeneralException;
use App\Models\Page\Page;
use App\Repositories\BaseRepository;
+use Illuminate\Support\Str;
/**
* Class PagesRepository.
@@ -51,7 +52,7 @@ public function create(array $input)
}
// Making extra fields
- $input['page_slug'] = str_slug($input['title']);
+ $input['page_slug'] = Str::slug($input['title']);
$input['status'] = isset($input['status']) ? 1 : 0;
$input['created_by'] = auth()->id();
@@ -79,7 +80,7 @@ public function update($page, array $input)
}
// Making extra fields
- $input['page_slug'] = str_slug($input['title']);
+ $input['page_slug'] = Str::slug($input['title']);
$input['status'] = isset($input['status']) ? 1 : 0;
$input['updated_by'] = access()->user()->id;
diff --git a/composer.json b/composer.json
index d7724c19..2f78b9eb 100644
--- a/composer.json
+++ b/composer.json
@@ -11,8 +11,8 @@
"license": "MIT",
"type": "project",
"require": {
- "php": ">=7.1.3",
- "arcanedev/log-viewer": "^4.5",
+ "php": "^7.2",
+ "arcanedev/log-viewer": "^5.0",
"arcanedev/no-captcha": "^9.0",
"beyondcode/laravel-self-diagnosis": "^1.2",
"creativeorange/gravatar": "~1.0",
@@ -20,24 +20,25 @@
"doctrine/dbal": "^2.9",
"fideloper/proxy": "^4.0",
"hieu-le/active": "^3.5",
- "laravel/framework": "5.8.*",
- "laravel/passport": "^7.2",
- "laravel/socialite": "^4.1",
+ "laravel/framework": "^6.0",
+ "laravel/passport": "^7.3.3",
+ "laravel/socialite": "^4.2",
"laravel/tinker": "~1.0",
- "laravelcollective/html": "^5.4.0",
- "spatie/laravel-cors": "^1.2",
+ "laravelcollective/html": "6.0.*",
+ "spatie/laravel-cors": "^1.6",
"unisharp/laravel-filemanager": "~1.8",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"bvipul/generator": "^5.8.2",
- "codedungeon/phpunit-result-printer": "^0.26.1",
- "filp/whoops": "^2.0",
+ "codedungeon/phpunit-result-printer": "^0.26",
"friendsofphp/php-cs-fixer": "^2.14",
"fzaninotto/faker": "^1.4",
- "laravel/telescope": "^2.0",
+ "laravel/telescope": "^2.1",
"mockery/mockery": "^1.0",
- "phpunit/phpunit": "^8.0"
+ "phpunit/phpunit": "^8.0",
+ "facade/ignition": "^1.4",
+ "nunomaduro/collision": "^3.0"
},
"config": {
"optimize-autoloader": true,
@@ -116,4 +117,4 @@
"npm audit"
]
}
-}
+}
\ No newline at end of file
diff --git a/config/broadcasting.php b/config/broadcasting.php
index 2f417296..ec2d8a3d 100755
--- a/config/broadcasting.php
+++ b/config/broadcasting.php
@@ -36,7 +36,8 @@
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
- //
+ 'cluster' => env('PUSHER_APP_CLUSTER'),
+ 'useTLS' => true,
],
],
diff --git a/config/cache.php b/config/cache.php
index b12eff52..0cbc938a 100755
--- a/config/cache.php
+++ b/config/cache.php
@@ -1,5 +1,7 @@
[
- // Memcached::OPT_CONNECT_TIMEOUT => 2000,
+ // Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
@@ -70,7 +73,16 @@
'redis' => [
'driver' => 'redis',
- 'connection' => 'default',
+ 'connection' => 'cache',
+ ],
+
+ 'dynamodb' => [
+ 'driver' => 'dynamodb',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+ 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
+ 'endpoint' => env('DYNAMODB_ENDPOINT'),
],
],
@@ -86,6 +98,6 @@
|
*/
- 'prefix' => 'laravel',
+ 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];
diff --git a/config/database.php b/config/database.php
index 7e50442e..273e1f6e 100755
--- a/config/database.php
+++ b/config/database.php
@@ -1,6 +1,9 @@
[
+
'sqlite' => [
'driver' => 'sqlite',
+ 'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
- 'foreign_key_constraints' => true,
'prefix' => '',
+ 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
- 'driver' => 'mysql',
- 'host' => env('DB_HOST', '127.0.0.1'),
- 'port' => env('DB_PORT', '3306'),
- 'database' => env('DB_DATABASE', 'forge'),
- 'username' => env('DB_USERNAME', 'forge'),
- 'password' => env('DB_PASSWORD', ''),
- 'unix_socket' => env('DB_SOCKET', ''),
- 'charset' => 'utf8mb4',
- 'collation' => 'utf8mb4_unicode_ci',
- 'prefix' => '',
- 'strict' => false, //If you set strict to true, then make sure to enable which modes you want to enable by looking at 'modes' key in this config
- 'engine' => null,
- 'modes' => [
- // "ONLY_FULL_GROUP_BY",
- // "STRICT_TRANS_TABLES",
- // "NO_ZERO_IN_DATE",
- // "NO_ZERO_DATE",
- // "ERROR_FOR_DIVISION_BY_ZERO",
- // "NO_AUTO_CREATE_USER",
- // "NO_ENGINE_SUBSTITUTION",
- ],
+ 'driver' => 'mysql',
+ 'url' => env('DATABASE_URL'),
+ 'host' => env('DB_HOST', '127.0.0.1'),
+ 'port' => env('DB_PORT', '3306'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'unix_socket' => env('DB_SOCKET', ''),
+ 'charset' => 'utf8mb4',
+ 'collation' => 'utf8mb4_unicode_ci',
+ 'prefix' => '',
+ 'prefix_indexes' => true,
+ 'strict' => true,
+ 'engine' => null,
+ 'options' => extension_loaded('pdo_mysql') ? array_filter([
+ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
+ ]) : [],
],
'pgsql' => [
- 'driver' => 'pgsql',
- 'host' => env('DB_HOST', '127.0.0.1'),
- 'port' => env('DB_PORT', '5432'),
- 'database' => env('DB_DATABASE', 'forge'),
- 'username' => env('DB_USERNAME', 'forge'),
- 'password' => env('DB_PASSWORD', ''),
- 'charset' => 'utf8',
- 'prefix' => '',
- 'schema' => 'public',
- 'sslmode' => 'prefer',
+ 'driver' => 'pgsql',
+ 'url' => env('DATABASE_URL'),
+ 'host' => env('DB_HOST', '127.0.0.1'),
+ 'port' => env('DB_PORT', '5432'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
+ 'prefix_indexes' => true,
+ 'schema' => 'public',
+ 'sslmode' => 'prefer',
+ ],
+
+ 'sqlsrv' => [
+ 'driver' => 'sqlsrv',
+ 'url' => env('DATABASE_URL'),
+ 'host' => env('DB_HOST', 'localhost'),
+ 'port' => env('DB_PORT', '1433'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
+ 'prefix_indexes' => true,
],
+
],
/*
@@ -95,19 +112,36 @@
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
- | provides a richer set of commands than a typical key-value systems
+ | provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
- 'client' => 'predis',
+
+ 'client' => env('REDIS_CLIENT', 'phpredis'),
+
+ 'options' => [
+ 'cluster' => env('REDIS_CLUSTER', 'redis'),
+ 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
+ ],
'default' => [
+ 'url' => env('REDIS_URL'),
+ 'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'password' => env('REDIS_PASSWORD', null),
+ 'port' => env('REDIS_PORT', 6379),
+ 'database' => env('REDIS_DB', 0),
+ ],
+
+ 'cache' => [
+ 'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
- 'database' => 0,
+ 'database' => env('REDIS_CACHE_DB', 1),
],
+
],
+
];
diff --git a/config/filesystems.php b/config/filesystems.php
index f99803df..e92b5c1d 100755
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -13,7 +13,7 @@
|
*/
- 'default' => 'local',
+ 'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
@@ -26,7 +26,7 @@
|
*/
- 'cloud' => 's3',
+ 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
@@ -37,7 +37,7 @@
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
- | Supported Drivers: "local", "ftp", "s3", "rackspace"
+ | Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
@@ -57,10 +57,11 @@
's3' => [
'driver' => 's3',
- 'key' => env('AWS_KEY'),
- 'secret' => env('AWS_SECRET'),
- 'region' => env('AWS_REGION'),
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
+ 'url' => env('AWS_URL'),
],
],
diff --git a/config/logging.php b/config/logging.php
index e0a412a7..d9b7c0ee 100644
--- a/config/logging.php
+++ b/config/logging.php
@@ -1,5 +1,9 @@
[
'stack' => [
- 'driver' => 'stack',
- 'channels' => ['single'],
+ 'driver' => 'stack',
+ 'channels' => ['daily'],
+ 'ignore_exceptions' => false,
],
'single' => [
@@ -45,7 +51,7 @@
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
- 'days' => 7,
+ 'days' => 14,
],
'slack' => [
@@ -56,6 +62,25 @@
'level' => 'critical',
],
+ 'papertrail' => [
+ 'driver' => 'monolog',
+ 'level' => 'debug',
+ 'handler' => SyslogUdpHandler::class,
+ 'handler_with' => [
+ 'host' => env('PAPERTRAIL_URL'),
+ 'port' => env('PAPERTRAIL_PORT'),
+ ],
+ ],
+
+ 'stderr' => [
+ 'driver' => 'monolog',
+ 'handler' => StreamHandler::class,
+ 'formatter' => env('LOG_STDERR_FORMATTER'),
+ 'with' => [
+ 'stream' => 'php://stderr',
+ ],
+ ],
+
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
@@ -65,6 +90,11 @@
'driver' => 'errorlog',
'level' => 'debug',
],
+
+ 'null' => [
+ 'driver' => 'monolog',
+ 'handler' => NullHandler::class,
+ ],
],
];
diff --git a/config/mail.php b/config/mail.php
index e2a0a4b4..c939f114 100755
--- a/config/mail.php
+++ b/config/mail.php
@@ -11,8 +11,8 @@
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
- | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
- | "sparkpost", "log", "array"
+ | Supported: "smtp", "sendmail", "mailgun", "ses",
+ | "postmark", "log", "array"
|
*/
@@ -29,7 +29,7 @@
|
*/
- 'host' => env('MAIL_HOST', 'smtp.gmail.com'),
+ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
@@ -56,8 +56,8 @@
*/
'from' => [
- 'address' => env('MAIL_FROM', 'viral.solani@gmail.com'),
- 'name' => env('MAIL_FROM_NAME', 'Admin'),
+ 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
+ 'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
@@ -120,4 +120,17 @@
],
],
+ /*
+ |--------------------------------------------------------------------------
+ | Log Channel
+ |--------------------------------------------------------------------------
+ |
+ | If you are using the "log" driver, you may specify the logging channel
+ | if you prefer to keep mail messages separate from other log entries
+ | for simpler reading. Otherwise, the default channel will be used.
+ |
+ */
+
+ 'log_channel' => env('MAIL_LOG_CHANNEL'),
+
];
diff --git a/config/queue.php b/config/queue.php
index 3a5de83f..3895ab4c 100755
--- a/config/queue.php
+++ b/config/queue.php
@@ -4,18 +4,16 @@
/*
|--------------------------------------------------------------------------
- | Default Queue Driver
+ | Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
- | syntax for each one. Here you may set the default queue driver.
- |
- | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+ | syntax for every one. Here you may define a default connection.
|
*/
- 'default' => env('QUEUE_DRIVER', 'sync'),
+ 'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
@@ -26,6 +24,8 @@
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
+ | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+ |
*/
'connections' => [
@@ -46,22 +46,24 @@
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
+ 'block_for' => 0,
],
'sqs' => [
'driver' => 'sqs',
- 'key' => 'your-public-key',
- 'secret' => 'your-secret-key',
- 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
- 'queue' => 'your-queue-name',
- 'region' => 'us-east-1',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
+ 'queue' => env('SQS_QUEUE', 'your-queue-name'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
- 'queue' => 'default',
+ 'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
+ 'block_for' => null,
],
],
@@ -78,6 +80,7 @@
*/
'failed' => [
+ 'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
diff --git a/config/services.php b/config/services.php
index b0060db3..3215b423 100755
--- a/config/services.php
+++ b/config/services.php
@@ -1,7 +1,5 @@
[
- 'domain' => env('MAILGUN_DOMAIN'),
- 'secret' => env('MAILGUN_SECRET'),
- ],
-
- 'ses' => [
- 'key' => env('SES_KEY'),
- 'secret' => env('SES_SECRET'),
- 'region' => 'us-east-1',
- ],
-
- 'sparkpost' => [
- 'secret' => env('SPARKPOST_SECRET'),
+ 'domain' => env('MAILGUN_DOMAIN'),
+ 'secret' => env('MAILGUN_SECRET'),
+ 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
- 'stripe' => [
- 'model' => User::class,
- 'key' => env('STRIPE_KEY'),
- 'secret' => env('STRIPE_SECRET'),
+ 'postmark' => [
+ 'token' => env('POSTMARK_TOKEN'),
],
- /*
- * Socialite Credentials
- * Redirect URL's need to be the same as specified on each network you set up this application on
- * as well as conform to the route:
- * http://localhost/public/login/SERVICE
- * Where service can github, facebook, twitter, google, linkedin, or bitbucket
- * Docs: https://github.com/laravel/socialite
- * Make sure 'scopes' and 'with' are arrays, if their are none, use empty arrays []
- */
- 'bitbucket' => [
- 'client_id' => env('BITBUCKET_CLIENT_ID'),
- 'client_secret' => env('BITBUCKET_CLIENT_SECRET'),
- 'redirect' => env('BITBUCKET_REDIRECT'),
- 'scopes' => [],
- 'with' => [],
- ],
-
- 'facebook' => [
- 'client_id' => env('FACEBOOK_CLIENT_ID'),
- 'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
- 'redirect' => env('FACEBOOK_REDIRECT'),
- 'scopes' => [],
- 'with' => [],
- 'fields' => [],
- ],
-
- 'github' => [
- 'client_id' => env('GITHUB_CLIENT_ID'),
- 'client_secret' => env('GITHUB_CLIENT_SECRET'),
- 'redirect' => env('GITHUB_REDIRECT'),
- 'scopes' => [],
- 'with' => [],
- ],
-
- 'google' => [
- 'client_id' => env('GOOGLE_CLIENT_ID'),
- 'client_secret' => env('GOOGLE_CLIENT_SECRET'),
- 'redirect' => env('GOOGLE_REDIRECT'),
-
- /*
- * Only allows google to grab email address
- * Default scopes array also has: 'https://www.googleapis.com/auth/plus.login'
- * https://medium.com/@njovin/fixing-laravel-socialite-s-google-permissions-2b0ef8c18205
- */
- 'scopes' => [
- 'https://www.googleapis.com/auth/plus.me',
- 'https://www.googleapis.com/auth/plus.profile.emails.read',
- ],
-
- 'with' => [],
- ],
-
- 'linkedin' => [
- 'client_id' => env('LINKEDIN_CLIENT_ID'),
- 'client_secret' => env('LINKEDIN_CLIENT_SECRET'),
- 'redirect' => env('LINKEDIN_REDIRECT'),
- 'scopes' => [],
- 'with' => [],
- 'fields' => [],
+ 'ses' => [
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
- 'twitter' => [
- 'client_id' => env('TWITTER_CLIENT_ID'),
- 'client_secret' => env('TWITTER_CLIENT_SECRET'),
- 'redirect' => env('TWITTER_REDIRECT'),
- 'scopes' => [],
- 'with' => [],
- ],
];
diff --git a/database/factories/PageFactory.php b/database/factories/PageFactory.php
index a18bee47..922c0e8b 100644
--- a/database/factories/PageFactory.php
+++ b/database/factories/PageFactory.php
@@ -3,6 +3,7 @@
use App\Models\Access\User\User;
use App\Models\Page\Page;
use Faker\Generator as Faker;
+use Illuminate\Support\Str;
$factory->define(Page::class, function (Faker $faker) {
$title = $faker->sentence;
@@ -11,9 +12,9 @@
return [
'title' => $title,
- 'page_slug' => str_slug($title),
+ 'page_slug' => Str::slug($title),
'description' => $faker->paragraph,
- 'cannonical_link' => 'http://localhost:8000/'.str_slug($title),
+ 'cannonical_link' => 'http://localhost:8000/'.Str::slug($title),
'created_by' => function () {
return factory(User::class)->create()->id;
},
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
index c7fb4fb2..2ae833f6 100644
--- a/database/factories/UserFactory.php
+++ b/database/factories/UserFactory.php
@@ -2,6 +2,7 @@
use App\Models\Access\User\User;
use Faker\Generator;
+use Illuminate\Support\Str;
$factory->define(User::class, function (Generator $faker) {
static $password;
@@ -12,7 +13,7 @@
'email' => $faker->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'confirmation_code' => md5(uniqid(mt_rand(), true)),
- 'remember_token' => str_random(10),
+ 'remember_token' => Str::random(10),
];
});
diff --git a/routes/Backend/Helpers.php b/routes/Backend/Helpers.php
index dd1f383a..cf688c00 100644
--- a/routes/Backend/Helpers.php
+++ b/routes/Backend/Helpers.php
@@ -1,8 +1,10 @@
name('generate.slug');
diff --git a/tests/BrowserKitTestCase.php b/tests/BrowserKitTestCase.php
index 37c3af38..b35d8be5 100644
--- a/tests/BrowserKitTestCase.php
+++ b/tests/BrowserKitTestCase.php
@@ -50,7 +50,7 @@ abstract class BrowserKitTestCase extends BaseTestCase
*/
protected $userRole;
- public function setUp(): void
+ protected function setUp(): void
{
parent::setUp();
@@ -76,7 +76,7 @@ public function setUp(): void
$this->userRole = Role::find(3);
}
- public function tearDown(): void
+ protected function tearDown(): void
{
$this->beforeApplicationDestroyed(function () {
DB::disconnect();
diff --git a/tests/TestCase.php b/tests/TestCase.php
index fd7bade6..543c24a0 100755
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -54,7 +54,7 @@ public function signIn($user = null)
/**
* Set up tests.
*/
- public function setUp(): void
+ protected function setUp(): void
{
parent::setUp();
@@ -80,7 +80,7 @@ public function setUp(): void
$this->userRole = Role::find(3);
}
- public function tearDown(): void
+ protected function tearDown(): void
{
$this->beforeApplicationDestroyed(function () {
DB::disconnect();