Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/Authorization/Roles/BlogReaderRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function apply(Builder $builder, Model $model)
}
}

public function checkPrivileges(Users $users = null)
public function checkPrivileges(?Users $users = null)
{
//return UserHelper::hasRole(self::NAME, $users);
}
Expand Down
14 changes: 7 additions & 7 deletions src/Database/Filters/AccountsPerspectiveQueryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ public function tags($values)
* @var Builder
*/
protected $builder;

public function name($value)
{
return $this->builder->where('name', 'ilike', '%' . $value . '%');
}


public function isActive($value)
{
return $this->builder->where('is_active', $value);
Expand All @@ -54,7 +54,7 @@ public function is_active($value)
{
return $this->isActive($value);
}

public function isSuspended($value)
{
return $this->builder->where('is_suspended', $value);
Expand All @@ -65,7 +65,7 @@ public function is_suspended($value)
{
return $this->isSuspended($value);
}

public function isAutoTranslateEnabled($value)
{
return $this->builder->where('is_auto_translate_enabled', $value);
Expand All @@ -76,7 +76,7 @@ public function is_auto_translate_enabled($value)
{
return $this->isAutoTranslateEnabled($value);
}

public function createdAtStart($date)
{
return $this->builder->where('created_at', '>=', $date);
Expand Down Expand Up @@ -157,7 +157,7 @@ public function common_domain_id($value)
{
return $this->commonDomain($value);
}

public function commonLanguageId($value)
{
$commonLanguage = \NextDeveloper\Commons\Database\Models\Languages::where('uuid', $value)->first();
Expand All @@ -172,7 +172,7 @@ public function common_language_id($value)
{
return $this->commonLanguage($value);
}

// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE


Expand Down
10 changes: 5 additions & 5 deletions src/Database/Filters/AccountsQueryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function is_suspended($value)
{
return $this->isSuspended($value);
}

public function isAutoTranslateEnabled($value)
{
return $this->builder->where('is_auto_translate_enabled', $value);
Expand All @@ -39,7 +39,7 @@ public function is_auto_translate_enabled($value)
{
return $this->isAutoTranslateEnabled($value);
}

public function createdAtStart($date)
{
return $this->builder->where('created_at', '>=', $date);
Expand Down Expand Up @@ -120,7 +120,7 @@ public function common_domain_id($value)
{
return $this->commonDomain($value);
}

public function commonLanguageId($value)
{
$commonLanguage = \NextDeveloper\Commons\Database\Models\Languages::where('uuid', $value)->first();
Expand All @@ -135,7 +135,7 @@ public function common_language_id($value)
{
return $this->commonLanguage($value);
}

public function iamAccountId($value)
{
$iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first();
Expand All @@ -145,7 +145,7 @@ public function iamAccountId($value)
}
}


// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE


Expand Down
10 changes: 5 additions & 5 deletions src/Database/Filters/PostSlugHistoriesQueryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class PostSlugHistoriesQueryFilter extends AbstractQueryFilter
* @var Builder
*/
protected $builder;

public function slug($value)
{
return $this->builder->where('slug', 'ilike', '%' . $value . '%');
}


public function createdAtStart($date)
{
return $this->builder->where('created_at', '>=', $date);
Expand Down Expand Up @@ -104,7 +104,7 @@ public function blog_post_id($value)
{
return $this->blogPost($value);
}

public function iamAccountId($value)
{
$iamAccount = \NextDeveloper\IAM\Database\Models\Accounts::where('uuid', $value)->first();
Expand All @@ -114,7 +114,7 @@ public function iamAccountId($value)
}
}


public function iamUserId($value)
{
$iamUser = \NextDeveloper\IAM\Database\Models\Users::where('uuid', $value)->first();
Expand All @@ -124,7 +124,7 @@ public function iamUserId($value)
}
}


// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE


Expand Down
54 changes: 27 additions & 27 deletions src/Database/Filters/PostsPerspectiveQueryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,31 @@ public function tags($values)
* @var Builder
*/
protected $builder;

public function slug($value)
{
return $this->builder->where('slug', 'ilike', '%' . $value . '%');
}


public function title($value)
{
return $this->builder->where('title', 'ilike', '%' . $value . '%');
}


public function body($value)
{
return $this->builder->where('body', 'ilike', '%' . $value . '%');
}


public function abstract($value)
{
return $this->builder->where('abstract', 'ilike', '%' . $value . '%');
}


public function headerImage($value)
{
return $this->builder->where('header_image', 'ilike', '%' . $value . '%');
Expand All @@ -72,7 +72,7 @@ public function header_image($value)
{
return $this->headerImage($value);
}

public function metaTitle($value)
{
return $this->builder->where('meta_title', 'ilike', '%' . $value . '%');
Expand All @@ -83,7 +83,7 @@ public function meta_title($value)
{
return $this->metaTitle($value);
}

public function metaDescription($value)
{
return $this->builder->where('meta_description', 'ilike', '%' . $value . '%');
Expand All @@ -94,7 +94,7 @@ public function meta_description($value)
{
return $this->metaDescription($value);
}

public function metaKeywords($value)
{
return $this->builder->where('meta_keywords', 'ilike', '%' . $value . '%');
Expand All @@ -105,31 +105,31 @@ public function meta_keywords($value)
{
return $this->metaKeywords($value);
}

public function locale($value)
{
return $this->builder->where('locale', 'ilike', '%' . $value . '%');
}


public function author($value)
{
return $this->builder->where('author', 'ilike', '%' . $value . '%');
}


public function team($value)
{
return $this->builder->where('team', 'ilike', '%' . $value . '%');
}


public function category($value)
{
return $this->builder->where('category', 'ilike', '%' . $value . '%');
}


public function domainName($value)
{
return $this->builder->where('domain_name', 'ilike', '%' . $value . '%');
Expand All @@ -140,7 +140,7 @@ public function domain_name($value)
{
return $this->domainName($value);
}

public function replyCount($value)
{
$operator = substr($value, 0, 1);
Expand All @@ -159,7 +159,7 @@ public function reply_count($value)
{
return $this->replyCount($value);
}

public function readCount($value)
{
$operator = substr($value, 0, 1);
Expand All @@ -178,7 +178,7 @@ public function read_count($value)
{
return $this->readCount($value);
}

public function bonusPoints($value)
{
$operator = substr($value, 0, 1);
Expand All @@ -197,7 +197,7 @@ public function bonus_points($value)
{
return $this->bonusPoints($value);
}

public function alternateOf($value)
{
$operator = substr($value, 0, 1);
Expand All @@ -216,7 +216,7 @@ public function alternate_of($value)
{
return $this->alternateOf($value);
}

public function isActive($value)
{
return $this->builder->where('is_active', $value);
Expand All @@ -227,7 +227,7 @@ public function is_active($value)
{
return $this->isActive($value);
}

public function isLocked($value)
{
return $this->builder->where('is_locked', $value);
Expand All @@ -238,7 +238,7 @@ public function is_locked($value)
{
return $this->isLocked($value);
}

public function isPinned($value)
{
return $this->builder->where('is_pinned', $value);
Expand All @@ -249,7 +249,7 @@ public function is_pinned($value)
{
return $this->isPinned($value);
}

public function isDraft($value)
{
return $this->builder->where('is_draft', $value);
Expand All @@ -260,7 +260,7 @@ public function is_draft($value)
{
return $this->isDraft($value);
}

public function isMarkdown($value)
{
return $this->builder->where('is_markdown', $value);
Expand All @@ -271,7 +271,7 @@ public function is_markdown($value)
{
return $this->isMarkdown($value);
}

public function createdAtStart($date)
{
return $this->builder->where('created_at', '>=', $date);
Expand Down Expand Up @@ -347,7 +347,7 @@ public function iamAccountId($value)
}
}


public function iamUserId($value)
{
$iamUser = \NextDeveloper\IAM\Database\Models\Users::where('uuid', $value)->first();
Expand All @@ -357,7 +357,7 @@ public function iamUserId($value)
}
}


public function commonDomainId($value)
{
$commonDomain = \NextDeveloper\Commons\Database\Models\Domains::where('uuid', $value)->first();
Expand All @@ -372,7 +372,7 @@ public function common_domain_id($value)
{
return $this->commonDomain($value);
}

public function commonCategoryId($value)
{
$commonCategory = \NextDeveloper\Commons\Database\Models\Categories::where('uuid', $value)->first();
Expand All @@ -387,7 +387,7 @@ public function common_category_id($value)
{
return $this->commonCategory($value);
}

// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE


Expand Down
Loading