Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/Console/Commands/InstallAppCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 '';
}
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Responses/Backend/Blog/CreateResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
class CreateResponse implements Responsable
{
protected $status;

protected $blogTags;

protected $blogCategories;

public function __construct($status, $blogCategories, $blogTags)
Expand Down
3 changes: 3 additions & 0 deletions app/Http/Responses/Backend/Blog/EditResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
class EditResponse implements Responsable
{
protected $blog;

protected $status;

protected $blogTags;

protected $blogCategories;

public function __construct($blog, $status, $blogCategories, $blogTags)
Expand Down
1 change: 1 addition & 0 deletions app/Http/Responses/RedirectResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class RedirectResponse implements Responsable
{
protected $route;

protected $message;

public function __construct($route, $message)
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Utilities/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
abstract class Notification
{
protected $_message = null;

protected $_devices = null;

protected $_response = null;

protected $_body = null;

protected static $_url = null;

/*
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Utilities/NotificationIos.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Utilities/PushNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Access/PasswordReset/PasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
class PasswordReset extends BaseModel
{
public $timestamps = false;

protected $table = 'password_resets';

protected $fillable = [
'email',
'token',
Expand Down
10 changes: 10 additions & 0 deletions app/Models/Access/User/Traits/Attribute/UserAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public function getStatusButtonAttribute($class)

return '<a class="'.$class.'" href="'.route('admin.access.user.mark', [$this, 1]).'"><i class="fa fa-check-square" data-toggle="tooltip" data-placement="top" title="'.trans('buttons.backend.access.users.activate').'"></i>'.$name.'</a>';
}

break;

case 1:
Expand All @@ -159,6 +160,7 @@ public function getStatusButtonAttribute($class)

return '<a class="'.$class.'" href="'.route('admin.access.user.mark', [$this, 0]).'"><i class="fa fa-square" data-toggle="tooltip" data-placement="top" title="'.trans('buttons.backend.access.users.deactivate').'"></i>'.$name.'</a>';
}

break;

default:
Expand Down Expand Up @@ -313,6 +315,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
$button = ($counter <= 3) ? $this->getShowButtonAttribute($class) : '<li>'
.$this->getShowButtonAttribute($class).
'</li>';

break;
case 'edit-user':
$button = ($counter <= 3) ? $this->getEditButtonAttribute($class) : '<li>'
Expand All @@ -321,6 +324,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
$button .= ($counter <= 3) ? $this->getChangePasswordButtonAttribute($class) : '<li>'
.$this->getChangePasswordButtonAttribute($class).
'</li>';

break;
case 'activate-user':
if (\Route::currentRouteName() == 'admin.access.user.deactivated.get') {
Expand All @@ -330,6 +334,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}

break;
case 'deactivate-user':
if (\Route::currentRouteName() == 'admin.access.user.get') {
Expand All @@ -339,6 +344,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}

break;
case 'delete-user':
if (access()->user()->id != $this->id) {
Expand All @@ -348,6 +354,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}

break;
case 'login-as-user':
if (access()->user()->id != $this->id) {
Expand All @@ -357,6 +364,7 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}

break;
case 'clear-user-session':
if (access()->user()->id != $this->id) {
Expand All @@ -366,9 +374,11 @@ public function getActionButtonsByPermissionName($permissionName, $counter)
} else {
$button = '';
}

break;
default:
$button = '';

break;
}

Expand Down
1 change: 1 addition & 0 deletions app/Models/Access/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class User extends Authenticatable
UserRelationship,
UserSendPasswordReset,
HasApiTokens;

/**
* The database table used by the model.
*
Expand Down
1 change: 1 addition & 0 deletions app/Notifications/Frontend/Auth/UserNeedsPasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class UserNeedsPasswordReset extends Notification
{
use Queueable;

/**
* The password reset token.
*
Expand Down
1 change: 1 addition & 0 deletions app/Notifications/PasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class PasswordReset extends Notification
* @return void
*/
protected $user;

protected $token;

public function __construct($user, $token)
Expand Down
2 changes: 2 additions & 0 deletions app/Repositories/Backend/Access/User/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 3 additions & 2 deletions app/Repositories/Backend/Blogs/BlogsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Carbon\Carbon;
use DB;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;

/**
* Class BlogsRepository.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -266,6 +270,7 @@ public function renderDescription($text, $assets = false)

case 'string':
$text = str_replace('{'.$key.'}', $values, $text);

break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class NotificationRepository extends BaseRepository
* @var object
*/
public $model;

public $timestamps = false;

public function __construct(Notification $model)
Expand Down
5 changes: 3 additions & 2 deletions app/Repositories/Backend/Pages/PagesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Exceptions\GeneralException;
use App\Models\Page\Page;
use App\Repositories\BaseRepository;
use Illuminate\Support\Str;

/**
* Class PagesRepository.
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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;

Expand Down
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,34 @@
"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",
"davejamesmiller/laravel-breadcrumbs": "^5.0",
"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,
Expand Down Expand Up @@ -116,4 +117,4 @@
"npm audit"
]
}
}
}
3 changes: 2 additions & 1 deletion config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],

Expand Down
Loading