mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-30 23:42:49 -05:00
Merge branch '6.x.x' into Code-Style
This commit is contained in:
@@ -77,7 +77,7 @@ UNIT3D currently offers the following features:
|
||||
- A Redis server
|
||||
- MySQL 5.7 + or MariaDB 10.2 +
|
||||
- TheMovieDB API Key: https://www.themoviedb.org/documentation/api
|
||||
- A decent dedicated server. Dont try running this on some crappy server!
|
||||
- A decent dedicated server. Dont try running this on some basic server if you plann to run a large tracker!
|
||||
<pre>
|
||||
Processor: Intel Xeon E3-1245v2 -
|
||||
Cores/Threads: 4c/8t
|
||||
@@ -129,11 +129,6 @@ Use this command to generate demo users and torrents for testing purposes:
|
||||
|
||||
`php artisan demo:seed`
|
||||
|
||||
## <a name="docs"></a> 📖 Documentation (Out Of Date!)
|
||||
Repo - https://github.com/HDInnovations/UNIT3D-Community-Edition-Docs
|
||||
|
||||
Site - https://hdinnovations.github.io/UNIT3D-Community-Edition-Docs/
|
||||
|
||||
## <a name="updating"></a> 🖥️ Updating
|
||||
`php artisan git:update`
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class AutoDisableInactiveUsers extends Command
|
||||
|
||||
$current = Carbon::now();
|
||||
|
||||
$matches = User::whereIn('group_id', \config('pruning.group_ids'))->get();
|
||||
$matches = User::whereIntegerInRaw('group_id', \config('pruning.group_ids'))->get();
|
||||
|
||||
$users = $matches->where('created_at', '<', $current->copy()->subDays(\config('pruning.account_age'))->toDateTimeString())
|
||||
->where('last_login', '<', $current->copy()->subDays(\config('pruning.last_login'))->toDateTimeString())
|
||||
|
||||
@@ -50,7 +50,7 @@ class AutoGroup extends Command
|
||||
// Temp Hard Coding of Immune Groups (Config Files To Come)
|
||||
$current = Carbon::now();
|
||||
$groups = Group::select(['id'])->where('autogroup', '=', 1)->get()->toArray();
|
||||
foreach (User::whereIn('group_id', $groups)->get() as $user) {
|
||||
foreach (User::whereIntegerInRaw('group_id', $groups)->get() as $user) {
|
||||
$hiscount = History::where('user_id', '=', $user->id)->count();
|
||||
|
||||
// Temp Hard Coding of Group Requirements (Config Files To Come) (Upload in Bytes!) (Seedtime in Seconds!)
|
||||
|
||||
@@ -50,7 +50,7 @@ class AutoHighspeedTag extends Command
|
||||
$seedboxUsers = Seedbox::select(['user_id'])->get()->toArray();
|
||||
|
||||
if (\is_array($seedboxUsers) && $seedboxUsers !== []) {
|
||||
$torid = Peer::select(['torrent_id'])->whereIn('user_id', $seedboxUsers)->where('seeder', '=', 1)->get()->toArray();
|
||||
$torid = Peer::select(['torrent_id'])->whereIntegerInRaw('user_id', $seedboxUsers)->where('seeder', '=', 1)->get()->toArray();
|
||||
|
||||
foreach ($torid as $id) {
|
||||
$torrent = Torrent::select(['id', 'highspeed'])->where('id', '=', $id)->first();
|
||||
|
||||
@@ -53,8 +53,8 @@ class AutoRevokePermissions extends Command
|
||||
$disabledGroup = \cache()->rememberForever('disabled_group', fn () => Group::where('slug', '=', 'disabled')->pluck('id'));
|
||||
$prunedGroup = \cache()->rememberForever('pruned_group', fn () => Group::where('slug', '=', 'pruned')->pluck('id'));
|
||||
|
||||
User::whereNotIn('group_id', [$bannedGroup[0], $validatingGroup[0], $leechGroup[0], $disabledGroup[0], $prunedGroup[0]])->update(['can_download' => '1', 'can_request' => '1']);
|
||||
User::whereIn('group_id', [$bannedGroup[0], $validatingGroup[0], $leechGroup[0], $disabledGroup[0], $prunedGroup[0]])->update(['can_download' => '0', 'can_request' => '0']);
|
||||
User::whereIntegerNotInRaw('group_id', [$bannedGroup[0], $validatingGroup[0], $leechGroup[0], $disabledGroup[0], $prunedGroup[0]])->update(['can_download' => '1', 'can_request' => '1']);
|
||||
User::whereIntegerInRaw('group_id', [$bannedGroup[0], $validatingGroup[0], $leechGroup[0], $disabledGroup[0], $prunedGroup[0]])->update(['can_download' => '0', 'can_request' => '0']);
|
||||
|
||||
$warning = Warning::with('warneduser')->select(DB::raw('user_id, count(*) as value'))->where('active', '=', 1)->groupBy('user_id')->having('value', '>=', \config('hitrun.revoke'))->get();
|
||||
|
||||
|
||||
@@ -341,23 +341,23 @@ class TorrentController extends BaseController
|
||||
->when($request->has('keywords'), function ($query) use ($request) {
|
||||
$keywords = self::parseKeywords($request->input('keywords'));
|
||||
$keyword = Keyword::select(['torrent_id'])->whereIn('name', $keywords)->get();
|
||||
$query->whereIn('id', $keyword->torrent_id);
|
||||
$query->whereIntegerInRaw('id', $keyword->torrent_id);
|
||||
})
|
||||
->when($request->has('startYear') && $request->has('endYear'), function ($query) use ($request) {
|
||||
$query->whereBetween('release_year', [$request->input('startYear'), $request->input('endYear')]);
|
||||
})
|
||||
->when($request->has('categories'), function ($query) use ($request) {
|
||||
$query->whereIn('category_id', $request->input('categories'));
|
||||
$query->whereIntegerInRaw('category_id', $request->input('categories'));
|
||||
})
|
||||
->when($request->has('types'), function ($query) use ($request) {
|
||||
$query->whereIn('type_id', $request->input('types'));
|
||||
$query->whereIntegerInRaw('type_id', $request->input('types'));
|
||||
})
|
||||
->when($request->has('resolutions'), function ($query) use ($request) {
|
||||
$query->whereIn('resolution_id', $request->input('resolutions'));
|
||||
$query->whereIntegerInRaw('resolution_id', $request->input('resolutions'));
|
||||
})
|
||||
->when($request->has('genres'), function ($query) use ($request) {
|
||||
$tvCollection = DB::table('genre_tv')->whereIn('genre_id', $request->input('genres'))->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIn('genre_id', $request->input('genres'))->pluck('movie_id');
|
||||
$tvCollection = DB::table('genre_tv')->whereIntegerInRaw('genre_id', $request->input('genres'))->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIntegerInRaw('genre_id', $request->input('genres'))->pluck('movie_id');
|
||||
$mergedCollection = $tvCollection->merge($movieCollection);
|
||||
|
||||
$query->whereIn('tmdb', $mergedCollection);
|
||||
@@ -382,12 +382,12 @@ class TorrentController extends BaseController
|
||||
})
|
||||
->when($request->has('playlistId'), function ($query) use ($request) {
|
||||
$playlist = PlaylistTorrent::where('playlist_id', '=', $request->input('playlistId'))->pluck('torrent_id');
|
||||
$query->whereIn('id', $playlist);
|
||||
$query->whereIntegerInRaw('id', $playlist);
|
||||
})
|
||||
->when($request->has('collectionId'), function ($query) use ($request) {
|
||||
$categories = Category::where('movie_meta', '=', 1)->pluck('id');
|
||||
$collection = DB::table('collection_movie')->where('collection_id', '=', $request->input('collectionId'))->pluck('movie_id');
|
||||
$query->whereIn('category_id', $categories)->whereIn('tmdb', $collection);
|
||||
$query->whereIntegerInRaw('category_id', $categories)->whereIn('tmdb', $collection);
|
||||
})
|
||||
->when($request->has('free'), function ($query) {
|
||||
$query->where('free', '>=', 1);
|
||||
|
||||
@@ -443,6 +443,8 @@ class AnnounceController extends Controller
|
||||
'min interval' => self::MIN,
|
||||
'complete' => (int) $torrent->seeders,
|
||||
'incomplete' => (int) $torrent->leechers,
|
||||
'peers' => [],
|
||||
'peers6' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,12 +58,12 @@ class ForumController extends Controller
|
||||
|
||||
if ($request->has('body') && $request->input('body') != '') {
|
||||
$logger = 'forum.results_posts';
|
||||
$result = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->whereNotIn('topics.forum_id', $pests);
|
||||
$result = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->whereIntegerNotInRaw('topics.forum_id', $pests);
|
||||
}
|
||||
|
||||
if (! isset($logger)) {
|
||||
$logger = 'forum.results_topics';
|
||||
$result = Topic::whereNotIn('topics.forum_id', $pests);
|
||||
$result = Topic::whereIntegerNotInRaw('topics.forum_id', $pests);
|
||||
}
|
||||
|
||||
if ($request->has('body') && $request->input('body') != '') {
|
||||
@@ -76,10 +76,10 @@ class ForumController extends Controller
|
||||
|
||||
if ($request->has('subscribed') && $request->input('subscribed') == 1) {
|
||||
$result->where(function ($query) use ($topicNeos, $forumNeos) {
|
||||
$query->whereIn('topics.id', $topicNeos)->orWhereIn('topics.forum_id', $forumNeos);
|
||||
$query->whereIntegerInRaw('topics.id', $topicNeos)->orWhereIntegerInRaw('topics.forum_id', $forumNeos);
|
||||
});
|
||||
} elseif ($request->has('notsubscribed') && $request->input('notsubscribed') == 1) {
|
||||
$result->whereNotIn('topics.id', $topicNeos)->whereNotIn('topics.forum_id', $forumNeos);
|
||||
$result->whereIntegerNotInRaw('topics.id', $topicNeos)->whereIntegerNotInRaw('topics.forum_id', $forumNeos);
|
||||
}
|
||||
|
||||
if ($request->has('implemented') && $request->input('implemented') == 1) {
|
||||
@@ -196,8 +196,8 @@ class ForumController extends Controller
|
||||
$forumNeos = [];
|
||||
}
|
||||
|
||||
$builder = Forum::with('subscription_topics')->selectRaw('forums.id,max(forums.position) as position,max(forums.num_topic) as num_topic,max(forums.num_post) as num_post,max(forums.last_topic_id) as last_topic_id,max(forums.last_topic_name) as last_topic_name,max(forums.last_topic_slug) as last_topic_slug,max(forums.last_post_user_id) as last_post_user_id,max(forums.last_post_user_username) as last_post_user_username,max(forums.name) as name,max(forums.slug) as slug,max(forums.description) as description,max(forums.parent_id) as parent_id,max(forums.created_at),max(forums.updated_at),max(topics.id) as topic_id,max(topics.created_at) as topic_created_at')->leftJoin('topics', 'forums.id', '=', 'topics.forum_id')->whereNotIn('topics.forum_id', $pests)->where(function ($query) use ($topicNeos, $forumNeos) {
|
||||
$query->whereIn('topics.id', $topicNeos)->orWhereIn('forums.id', $forumNeos);
|
||||
$builder = Forum::with('subscription_topics')->selectRaw('forums.id,max(forums.position) as position,max(forums.num_topic) as num_topic,max(forums.num_post) as num_post,max(forums.last_topic_id) as last_topic_id,max(forums.last_topic_name) as last_topic_name,max(forums.last_topic_slug) as last_topic_slug,max(forums.last_post_user_id) as last_post_user_id,max(forums.last_post_user_username) as last_post_user_username,max(forums.name) as name,max(forums.slug) as slug,max(forums.description) as description,max(forums.parent_id) as parent_id,max(forums.created_at),max(forums.updated_at),max(topics.id) as topic_id,max(topics.created_at) as topic_created_at')->leftJoin('topics', 'forums.id', '=', 'topics.forum_id')->whereIntegerNotInRaw('topics.forum_id', $pests)->where(function ($query) use ($topicNeos, $forumNeos) {
|
||||
$query->whereIntegerInRaw('topics.id', $topicNeos)->orWhereIntegerInRaw('forums.id', $forumNeos);
|
||||
})->groupBy('forums.id');
|
||||
|
||||
$results = $builder->orderByDesc('topic_created_at')->paginate(25);
|
||||
@@ -238,7 +238,7 @@ class ForumController extends Controller
|
||||
$pests = [];
|
||||
}
|
||||
|
||||
$results = Topic::with(['forum'])->whereNotIn('topics.forum_id', $pests)->latest()->paginate(25);
|
||||
$results = Topic::with(['forum'])->whereIntegerNotInRaw('topics.forum_id', $pests)->latest()->paginate(25);
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
@@ -268,7 +268,7 @@ class ForumController extends Controller
|
||||
$pests = [];
|
||||
}
|
||||
|
||||
$results = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user', 'topic.forum'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->whereNotIn('topics.forum_id', $pests)->orderByDesc('posts.created_at')->paginate(25);
|
||||
$results = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user', 'topic.forum'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->whereIntegerNotInRaw('topics.forum_id', $pests)->orderBy('posts.created_at', 'desc')->paginate(25);
|
||||
|
||||
// Total Forums Count
|
||||
$numForums = Forum::count();
|
||||
|
||||
@@ -247,20 +247,20 @@ class RssController extends Controller
|
||||
}
|
||||
|
||||
if ($rss->object_torrent->categories && \is_array($rss->object_torrent->categories)) {
|
||||
$builder->whereIn('category_id', $categories);
|
||||
$builder->whereIntegerInRaw('category_id', $categories);
|
||||
}
|
||||
|
||||
if ($rss->object_torrent->types && \is_array($rss->object_torrent->types)) {
|
||||
$builder->whereIn('type_id', $types);
|
||||
$builder->whereIntegerInRaw('type_id', $types);
|
||||
}
|
||||
|
||||
if ($rss->object_torrent->resolutions && \is_array($rss->object_torrent->resolutions)) {
|
||||
$builder->whereIn('resolution_id', $resolutions);
|
||||
$builder->whereIntegerInRaw('resolution_id', $resolutions);
|
||||
}
|
||||
|
||||
if ($rss->object_torrent->genres && \is_array($rss->object_torrent->genres)) {
|
||||
$tvCollection = DB::table('genre_tv')->whereIn('genre_id', $genres)->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIn('genre_id', $genres)->pluck('movie_id');
|
||||
$tvCollection = DB::table('genre_tv')->whereIntegerInRaw('genre_id', $genres)->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIntegerInRaw('genre_id', $genres)->pluck('movie_id');
|
||||
$mergedCollection = $tvCollection->merge($movieCollection);
|
||||
|
||||
$builder->whereRaw("tmdb in ('".\implode("','", $mergedCollection->toArray())."')"); // Protected with Validation that IDs passed are not malicious
|
||||
@@ -295,7 +295,7 @@ class RssController extends Controller
|
||||
}
|
||||
|
||||
if ($rss->object_torrent->bookmark && $rss->object_torrent->bookmark != null) {
|
||||
$builder->whereIn('id', $user->bookmarks->pluck('id'));
|
||||
$builder->whereIntegerInRaw('id', $user->bookmarks->pluck('id'));
|
||||
}
|
||||
|
||||
if ($rss->object_torrent->alive && $rss->object_torrent->alive != null) {
|
||||
|
||||
@@ -48,7 +48,7 @@ class MassActionController extends Controller
|
||||
$validatingGroup = \cache()->rememberForever('validating_group', fn () => Group::where('slug', '=', 'validating')->pluck('id'));
|
||||
$disabledGroup = \cache()->rememberForever('disabled_group', fn () => Group::where('slug', '=', 'disabled')->pluck('id'));
|
||||
$prunedGroup = \cache()->rememberForever('pruned_group', fn () => Group::where('slug', '=', 'pruned')->pluck('id'));
|
||||
$users = User::whereNotIn('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->pluck('id');
|
||||
$users = User::whereIntegerNotInRaw('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->pluck('id');
|
||||
|
||||
$subject = $request->input('subject');
|
||||
$message = $request->input('message');
|
||||
|
||||
@@ -56,7 +56,7 @@ class StatsController extends Controller
|
||||
$disabledGroup = \cache()->rememberForever('disabled_group', fn () => Group::where('slug', '=', 'disabled')->pluck('id'));
|
||||
$prunedGroup = \cache()->rememberForever('pruned_group', fn () => Group::where('slug', '=', 'pruned')->pluck('id'));
|
||||
|
||||
return User::whereNotIn('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->count();
|
||||
return User::whereIntegerNotInRaw('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->count();
|
||||
});
|
||||
|
||||
// Total Disabled Members Count
|
||||
@@ -158,7 +158,7 @@ class StatsController extends Controller
|
||||
$prunedGroup = \cache()->rememberForever('pruned_group', fn () => Group::where('slug', '=', 'pruned')->pluck('id'));
|
||||
|
||||
// Fetch Top Uploaders
|
||||
$uploaded = User::latest('uploaded')->whereNotIn('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->take(100)->get();
|
||||
$uploaded = User::latest('uploaded')->whereIntegerNotInRaw('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->take(100)->get();
|
||||
|
||||
return \view('stats.users.uploaded', ['uploaded' => $uploaded]);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ class StatsController extends Controller
|
||||
$prunedGroup = \cache()->rememberForever('pruned_group', fn () => Group::where('slug', '=', 'pruned')->pluck('id'));
|
||||
|
||||
// Fetch Top Downloaders
|
||||
$downloaded = User::latest('downloaded')->whereNotIn('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->take(100)->get();
|
||||
$downloaded = User::latest('downloaded')->whereIntegerNotInRaw('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->take(100)->get();
|
||||
|
||||
return \view('stats.users.downloaded', ['downloaded' => $downloaded]);
|
||||
}
|
||||
@@ -227,7 +227,7 @@ class StatsController extends Controller
|
||||
$prunedGroup = \cache()->rememberForever('pruned_group', fn () => Group::where('slug', '=', 'pruned')->pluck('id'));
|
||||
|
||||
// Fetch Top Bankers
|
||||
$bankers = User::latest('seedbonus')->whereNotIn('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->take(100)->get();
|
||||
$bankers = User::latest('seedbonus')->whereIntegerNotInRaw('group_id', [$validatingGroup[0], $bannedGroup[0], $disabledGroup[0], $prunedGroup[0]])->take(100)->get();
|
||||
|
||||
return \view('stats.users.bankers', ['bankers' => $bankers]);
|
||||
}
|
||||
|
||||
@@ -112,13 +112,13 @@ class GraveyardSearch extends Component
|
||||
$query->where('name', 'LIKE', '%'.$this->name.'%');
|
||||
})
|
||||
->when($this->categories, function ($query) {
|
||||
$query->whereIn('category_id', $this->categories);
|
||||
$query->whereIntegerInRaw('category_id', $this->categories);
|
||||
})
|
||||
->when($this->types, function ($query) {
|
||||
$query->whereIn('type_id', $this->types);
|
||||
$query->whereIntegerInRaw('type_id', $this->types);
|
||||
})
|
||||
->when($this->resolutions, function ($query) {
|
||||
$query->whereIn('resolution_id', $this->resolutions);
|
||||
$query->v('resolution_id', $this->resolutions);
|
||||
})
|
||||
->when($this->tmdbId, function ($query) {
|
||||
$query->where('tmdb', '=', $this->tmdbId);
|
||||
|
||||
@@ -54,9 +54,9 @@ class SubtitleSearch extends Component
|
||||
return Subtitle::with(['user', 'torrent', 'language'])
|
||||
->when($this->search, fn ($query) => $query->where('title', 'like', '%'.$this->search.'%'))
|
||||
->when($this->categories, function ($query) {
|
||||
$torrents = Torrent::whereIn('category_id', $this->categories)->pluck('id');
|
||||
$torrents = Torrent::whereIntegerInRaw('category_id', $this->categories)->pluck('id');
|
||||
|
||||
return $query->whereIn('torrent_id', $torrents);
|
||||
return $query->whereIntegerInRaw('torrent_id', $torrents);
|
||||
})
|
||||
->when($this->language, fn ($query) => $query->where('language_id', '=', $this->language))
|
||||
->orderBy($this->sortField, $this->sortDirection)
|
||||
|
||||
@@ -243,8 +243,8 @@ class TorrentCardSearch extends Component
|
||||
->when($this->genres, function ($query) {
|
||||
$this->validate();
|
||||
|
||||
$tvCollection = DB::table('genre_tv')->whereIn('genre_id', $this->genres)->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIn('genre_id', $this->genres)->pluck('movie_id');
|
||||
$tvCollection = DB::table('genre_tv')->whereIntegerInRaw('genre_id', $this->genres)->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIntegerInRaw('genre_id', $this->genres)->pluck('movie_id');
|
||||
$mergedCollection = $tvCollection->merge($movieCollection);
|
||||
|
||||
$query->whereRaw("tmdb in ('".\implode("','", $mergedCollection->toArray())."')"); // Protected with Validation that IDs passed are not malicious
|
||||
@@ -278,7 +278,7 @@ class TorrentCardSearch extends Component
|
||||
->when($this->collectionId, function ($query) {
|
||||
$categories = Category::where('movie_meta', '=', 1)->pluck('id');
|
||||
$collection = DB::table('collection_movie')->where('collection_id', '=', $this->collectionId)->pluck('movie_id');
|
||||
$query->whereIntegerInRaw('category_id', $categories)->whereIn('tmdb', $collection);
|
||||
$query->whereIntegerInRaw('category_id', $categories)->whereIntegerInRaw('tmdb', $collection);
|
||||
})
|
||||
->when($this->free0 === '0' || $this->free0, function ($query) {
|
||||
$query->where('free', '=', 0);
|
||||
@@ -316,7 +316,7 @@ class TorrentCardSearch extends Component
|
||||
})
|
||||
->when($this->wished, function ($query) {
|
||||
$wishes = Wish::where('user_id', '=', \auth()->user()->id)->pluck('tmdb');
|
||||
$query->whereIntegerInRaw('tmdb', $wishes);
|
||||
$query->whereIn('tmdb', $wishes);
|
||||
})
|
||||
->when($this->internal, function ($query) {
|
||||
$query->where('internal', '=', 1);
|
||||
|
||||
@@ -243,8 +243,8 @@ class TorrentListSearch extends Component
|
||||
->when($this->genres, function ($query) {
|
||||
$this->validate();
|
||||
|
||||
$tvCollection = DB::table('genre_tv')->whereIn('genre_id', $this->genres)->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIn('genre_id', $this->genres)->pluck('movie_id');
|
||||
$tvCollection = DB::table('genre_tv')->whereIntegerInRaw('genre_id', $this->genres)->pluck('tv_id');
|
||||
$movieCollection = DB::table('genre_movie')->whereIntegerInRaw('genre_id', $this->genres)->pluck('movie_id');
|
||||
$mergedCollection = $tvCollection->merge($movieCollection);
|
||||
|
||||
$query->whereRaw("tmdb in ('".\implode("','", $mergedCollection->toArray())."')"); // Protected with Validation that IDs passed are not malicious
|
||||
@@ -278,7 +278,7 @@ class TorrentListSearch extends Component
|
||||
->when($this->collectionId, function ($query) {
|
||||
$categories = Category::where('movie_meta', '=', 1)->pluck('id');
|
||||
$collection = DB::table('collection_movie')->where('collection_id', '=', $this->collectionId)->pluck('movie_id');
|
||||
$query->whereIntegerInRaw('category_id', $categories)->whereIn('tmdb', $collection);
|
||||
$query->whereIntegerInRaw('category_id', $categories)->whereIntegerInRaw('tmdb', $collection);
|
||||
})
|
||||
->when($this->free0 === '0' || $this->free0, function ($query) {
|
||||
$query->where('free', '=', 0);
|
||||
@@ -316,7 +316,7 @@ class TorrentListSearch extends Component
|
||||
})
|
||||
->when($this->wished, function ($query) {
|
||||
$wishes = Wish::where('user_id', '=', \auth()->user()->id)->pluck('tmdb');
|
||||
$query->whereIntegerInRaw('tmdb', $wishes);
|
||||
$query->whereIn('tmdb', $wishes);
|
||||
})
|
||||
->when($this->internal, function ($query) {
|
||||
$query->where('internal', '=', 1);
|
||||
|
||||
@@ -140,13 +140,13 @@ class TorrentRequestSearch extends Component
|
||||
}
|
||||
})
|
||||
->when($this->categories, function ($query) {
|
||||
$query->whereIn('category_id', $this->categories);
|
||||
$query->whereIntegerInRaw('category_id', $this->categories);
|
||||
})
|
||||
->when($this->types, function ($query) {
|
||||
$query->whereIn('type_id', $this->types);
|
||||
$query->whereIntegerInRaw('type_id', $this->types);
|
||||
})
|
||||
->when($this->resolutions, function ($query) {
|
||||
$query->whereIn('resolution_id', $this->resolutions);
|
||||
$query->whereIntegerInRaw('resolution_id', $this->resolutions);
|
||||
})
|
||||
->when($this->tmdbId, function ($query) {
|
||||
$query->where('tmdb', '=', $this->tmdbId);
|
||||
@@ -181,11 +181,11 @@ class TorrentRequestSearch extends Component
|
||||
})
|
||||
->when($this->myClaims, function ($query) {
|
||||
$requestCliams = TorrentRequestClaim::where('username', '=', \auth()->user()->username)->pluck('request_id');
|
||||
$query->whereIn('id', $requestCliams)->whereNull('filled_hash')->whereNull('approved_by');
|
||||
$query->whereIntegerInRaw('id', $requestCliams)->whereNull('filled_hash')->whereNull('approved_by');
|
||||
})
|
||||
->when($this->myVoted, function ($query) {
|
||||
$requestVotes = TorrentRequestBounty::where('user_id', '=', \auth()->user()->id)->pluck('requests_id');
|
||||
$query->whereIn('id', $requestVotes);
|
||||
$query->whereIntegerInRaw('id', $requestVotes);
|
||||
})
|
||||
->when($this->myFilled, function ($query) {
|
||||
$query->where('filled_by', '=', \auth()->user()->id);
|
||||
|
||||
@@ -64,7 +64,7 @@ class Forum extends Model
|
||||
$subscriptions = \auth()->user()->subscriptions->where('topic_id', '>', '0')->pluck('topic_id')->toArray();
|
||||
|
||||
return $this->hasMany(Topic::class)->where(function ($query) use ($id, $subscriptions) {
|
||||
$query->whereIn('topics.id', [$id])->orWhereIn('topics.id', $subscriptions);
|
||||
$query->whereIntegerInRaw('topics.id', [$id])->orWhereIntegerInRaw('topics.id', $subscriptions);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -858,7 +858,7 @@ class User extends Authenticatable
|
||||
{
|
||||
$peers = Peer::where('user_id', '=', $this->id)->where('seeder', '=', 1)->pluck('torrent_id');
|
||||
|
||||
return Torrent::whereIn('id', $peers)->sum('size');
|
||||
return Torrent::whereIntegerInRaw('id', $peers)->sum('size');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,10 +24,10 @@ class AlbumFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'name' => $this->faker->name,
|
||||
'description' => $this->faker->text,
|
||||
'imdb' => $this->faker->word,
|
||||
'cover_image' => $this->faker->word,
|
||||
'name' => $this->faker->name(),
|
||||
'description' => $this->faker->text(),
|
||||
'imdb' => $this->faker->word(),
|
||||
'cover_image' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ class ApplicationFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'email' => $this->faker->unique()->safeEmail,
|
||||
'referrer' => $this->faker->text,
|
||||
'status' => $this->faker->boolean,
|
||||
'type' => $this->faker->word(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'referrer' => $this->faker->text(),
|
||||
'status' => $this->faker->boolean(),
|
||||
'moderated_at' => $this->faker->dateTime(),
|
||||
'moderated_by' => fn () => User::factory()->create()->id,
|
||||
'accepted_by' => $this->faker->randomNumber(),
|
||||
|
||||
@@ -24,7 +24,7 @@ class ApplicationImageProofFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'application_id' => fn () => Application::factory()->create()->id,
|
||||
'image' => $this->faker->word,
|
||||
'image' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class ApplicationUrlProofFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'application_id' => fn () => Application::factory()->create()->id,
|
||||
'url' => $this->faker->url,
|
||||
'url' => $this->faker->url(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ class ArticleFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'title' => $this->faker->word,
|
||||
'slug' => $this->faker->slug,
|
||||
'image' => $this->faker->word,
|
||||
'content' => $this->faker->text,
|
||||
'title' => $this->faker->word(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'image' => $this->faker->word(),
|
||||
'content' => $this->faker->text(),
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ class AuditFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'model_name' => $this->faker->word,
|
||||
'model_name' => $this->faker->word(),
|
||||
'model_entry_id' => $this->faker->randomNumber(),
|
||||
'action' => $this->faker->word,
|
||||
'record' => $this->faker->word,
|
||||
'action' => $this->faker->word(),
|
||||
'record' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ class BanFactory extends Factory
|
||||
return [
|
||||
'owned_by' => fn () => User::factory()->create()->id,
|
||||
'created_by' => fn () => User::factory()->create()->id,
|
||||
'ban_reason' => $this->faker->text,
|
||||
'unban_reason' => $this->faker->text,
|
||||
'ban_reason' => $this->faker->text(),
|
||||
'unban_reason' => $this->faker->text(),
|
||||
'removed_at' => $this->faker->dateTime(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@ class BonExchangeFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'description' => $this->faker->text,
|
||||
'description' => $this->faker->text(),
|
||||
'value' => $this->faker->randomNumber(),
|
||||
'cost' => $this->faker->randomNumber(),
|
||||
'upload' => $this->faker->boolean,
|
||||
'download' => $this->faker->boolean,
|
||||
'personal_freeleech' => $this->faker->boolean,
|
||||
'invite' => $this->faker->boolean,
|
||||
'upload' => $this->faker->boolean(),
|
||||
'download' => $this->faker->boolean(),
|
||||
'personal_freeleech' => $this->faker->boolean(),
|
||||
'invite' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,14 +25,14 @@ class BonTransactionsFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'itemID' => fn () => BonExchange::factory()->create()->id,
|
||||
'name' => $this->faker->name,
|
||||
'name' => $this->faker->name(),
|
||||
'cost' => $this->faker->randomFloat(),
|
||||
'sender' => fn () => User::factory()->create()->id,
|
||||
'receiver' => fn () => User::factory()->create()->id,
|
||||
'torrent_id' => $this->faker->randomNumber(),
|
||||
'donation_id' => $this->faker->randomNumber(),
|
||||
'post_id' => $this->faker->randomNumber(),
|
||||
'comment' => $this->faker->text,
|
||||
'comment' => $this->faker->text(),
|
||||
'date_actioned' => $this->faker->dateTime(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -23,22 +23,22 @@ class BotFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->name,
|
||||
'command' => $this->faker->word,
|
||||
'color' => $this->faker->word,
|
||||
'icon' => $this->faker->word,
|
||||
'emoji' => $this->faker->word,
|
||||
'info' => $this->faker->word,
|
||||
'about' => $this->faker->word,
|
||||
'help' => $this->faker->text,
|
||||
'active' => $this->faker->boolean,
|
||||
'is_protected' => $this->faker->boolean,
|
||||
'is_triviabot' => $this->faker->boolean,
|
||||
'is_nerdbot' => $this->faker->boolean,
|
||||
'is_systembot' => $this->faker->boolean,
|
||||
'is_casinobot' => $this->faker->boolean,
|
||||
'is_betbot' => $this->faker->boolean,
|
||||
'slug' => $this->faker->slug(),
|
||||
'name' => $this->faker->name(),
|
||||
'command' => $this->faker->word(),
|
||||
'color' => $this->faker->word(),
|
||||
'icon' => $this->faker->word(),
|
||||
'emoji' => $this->faker->word(),
|
||||
'info' => $this->faker->word(),
|
||||
'about' => $this->faker->word(),
|
||||
'help' => $this->faker->text(),
|
||||
'active' => $this->faker->boolean(),
|
||||
'is_protected' => $this->faker->boolean(),
|
||||
'is_triviabot' => $this->faker->boolean(),
|
||||
'is_nerdbot' => $this->faker->boolean(),
|
||||
'is_systembot' => $this->faker->boolean(),
|
||||
'is_casinobot' => $this->faker->boolean(),
|
||||
'is_betbot' => $this->faker->boolean(),
|
||||
'uploaded' => $this->faker->randomNumber(),
|
||||
'downloaded' => $this->faker->randomNumber(),
|
||||
'fl_tokens' => $this->faker->randomNumber(),
|
||||
|
||||
@@ -24,13 +24,13 @@ class BotTransactionFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'type' => $this->faker->word(),
|
||||
'cost' => $this->faker->randomFloat(),
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'bot_id' => fn () => Bot::factory()->create()->id,
|
||||
'to_user' => $this->faker->boolean,
|
||||
'to_bot' => $this->faker->boolean,
|
||||
'comment' => $this->faker->text,
|
||||
'to_user' => $this->faker->boolean(),
|
||||
'to_bot' => $this->faker->boolean(),
|
||||
'comment' => $this->faker->text(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ class CategoryFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'image' => $this->faker->word,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'image' => $this->faker->word(),
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'icon' => $this->faker->word,
|
||||
'icon' => $this->faker->word(),
|
||||
'no_meta' => true,
|
||||
'music_meta' => false,
|
||||
'game_meta' => false,
|
||||
|
||||
@@ -22,9 +22,9 @@ class ChatStatusFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->unique()->name,
|
||||
'color' => $this->faker->unique()->word,
|
||||
'icon' => $this->faker->word,
|
||||
'name' => $this->faker->unique()->name(),
|
||||
'color' => $this->faker->unique()->word(),
|
||||
'icon' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class ChatroomFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->unique()->word,
|
||||
'name' => $this->faker->unique()->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class CommentFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'content' => $this->faker->text,
|
||||
'content' => $this->faker->text(),
|
||||
'anon' => (int) $this->faker->boolean(),
|
||||
'torrent_id' => fn () => Torrent::factory()->create()->id,
|
||||
'article_id' => fn () => Article::factory()->create()->id,
|
||||
|
||||
@@ -23,8 +23,8 @@ class FailedLoginAttemptFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => $this->faker->randomNumber(),
|
||||
'username' => $this->faker->userName,
|
||||
'ip_address' => $this->faker->word,
|
||||
'username' => $this->faker->userName(),
|
||||
'ip_address' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,13 +26,13 @@ class ForumFactory extends Factory
|
||||
'num_topic' => $this->faker->randomNumber(),
|
||||
'num_post' => $this->faker->randomNumber(),
|
||||
'last_topic_id' => $this->faker->randomNumber(),
|
||||
'last_topic_name' => $this->faker->word,
|
||||
'last_topic_slug' => $this->faker->word,
|
||||
'last_topic_name' => $this->faker->word(),
|
||||
'last_topic_slug' => $this->faker->word(),
|
||||
'last_post_user_id' => $this->faker->randomNumber(),
|
||||
'last_post_user_username' => $this->faker->word,
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'description' => $this->faker->text,
|
||||
'last_post_user_username' => $this->faker->word(),
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'description' => $this->faker->text(),
|
||||
'parent_id' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ class GitUpdateFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'hash' => $this->faker->word,
|
||||
'name' => $this->faker->name(),
|
||||
'hash' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class GraveyardFactory extends Factory
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'torrent_id' => fn () => Torrent::factory()->create()->id,
|
||||
'seedtime' => $this->faker->randomNumber(),
|
||||
'rewarded' => $this->faker->boolean,
|
||||
'rewarded' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,24 +22,24 @@ class GroupFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'level' => $this->faker->randomNumber(),
|
||||
'color' => $this->faker->word,
|
||||
'icon' => $this->faker->word,
|
||||
'effect' => $this->faker->word,
|
||||
'is_internal' => $this->faker->boolean,
|
||||
'is_owner' => $this->faker->boolean,
|
||||
'is_admin' => $this->faker->boolean,
|
||||
'is_modo' => $this->faker->boolean,
|
||||
'is_trusted' => $this->faker->boolean,
|
||||
'is_immune' => $this->faker->boolean,
|
||||
'is_freeleech' => $this->faker->boolean,
|
||||
'is_double_upload' => $this->faker->boolean,
|
||||
'can_upload' => $this->faker->boolean,
|
||||
'is_incognito' => $this->faker->boolean,
|
||||
'autogroup' => $this->faker->boolean,
|
||||
'color' => $this->faker->word(),
|
||||
'icon' => $this->faker->word(),
|
||||
'effect' => $this->faker->word(),
|
||||
'is_internal' => $this->faker->boolean(),
|
||||
'is_owner' => $this->faker->boolean(),
|
||||
'is_admin' => $this->faker->boolean(),
|
||||
'is_modo' => $this->faker->boolean(),
|
||||
'is_trusted' => $this->faker->boolean(),
|
||||
'is_immune' => $this->faker->boolean(),
|
||||
'is_freeleech' => $this->faker->boolean(),
|
||||
'is_double_upload' => $this->faker->boolean(),
|
||||
'can_upload' => $this->faker->boolean(),
|
||||
'is_incognito' => $this->faker->boolean(),
|
||||
'autogroup' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class HistoryFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'agent' => $this->faker->word,
|
||||
'agent' => $this->faker->word(),
|
||||
'info_hash' => fn () => Torrent::factory()->create()->id,
|
||||
'uploaded' => $this->faker->randomNumber(),
|
||||
'actual_uploaded' => $this->faker->randomNumber(),
|
||||
@@ -33,12 +33,12 @@ class HistoryFactory extends Factory
|
||||
'downloaded' => $this->faker->randomNumber(),
|
||||
'actual_downloaded' => $this->faker->randomNumber(),
|
||||
'client_downloaded' => $this->faker->randomNumber(),
|
||||
'seeder' => $this->faker->boolean,
|
||||
'active' => $this->faker->boolean,
|
||||
'seeder' => $this->faker->boolean(),
|
||||
'active' => $this->faker->boolean(),
|
||||
'seedtime' => $this->faker->randomNumber(),
|
||||
'immune' => $this->faker->boolean,
|
||||
'hitrun' => $this->faker->boolean,
|
||||
'prewarn' => $this->faker->boolean,
|
||||
'immune' => $this->faker->boolean(),
|
||||
'hitrun' => $this->faker->boolean(),
|
||||
'prewarn' => $this->faker->boolean(),
|
||||
'completed_at' => $this->faker->dateTime(),
|
||||
'deleted_at' => $this->faker->dateTime(),
|
||||
];
|
||||
|
||||
@@ -25,9 +25,9 @@ class ImageFactory extends Factory
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'album_id' => $this->faker->randomNumber(),
|
||||
'image' => $this->faker->word,
|
||||
'description' => $this->faker->text,
|
||||
'type' => $this->faker->word,
|
||||
'image' => $this->faker->word(),
|
||||
'description' => $this->faker->text(),
|
||||
'type' => $this->faker->word(),
|
||||
'downloads' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ class InviteFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'email' => $this->faker->safeEmail,
|
||||
'code' => $this->faker->word,
|
||||
'email' => $this->faker->safeEmail(),
|
||||
'code' => $this->faker->word(),
|
||||
'expires_on' => $this->faker->dateTime(),
|
||||
'accepted_by' => fn () => User::factory()->create()->id,
|
||||
'accepted_at' => $this->faker->dateTime(),
|
||||
'custom' => $this->faker->text,
|
||||
'custom' => $this->faker->text(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ class LikeFactory extends Factory
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'post_id' => fn () => Post::factory()->create()->id,
|
||||
'subtitle_id' => $this->faker->randomNumber(),
|
||||
'like' => $this->faker->boolean,
|
||||
'dislike' => $this->faker->boolean,
|
||||
'like' => $this->faker->boolean(),
|
||||
'dislike' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class MessageFactory extends Factory
|
||||
'chatroom_id' => fn () => Chatroom::factory()->create()->id,
|
||||
'receiver_id' => fn () => User::factory()->create()->id,
|
||||
'bot_id' => fn () => Bot::factory()->create()->id,
|
||||
'message' => $this->faker->text,
|
||||
'message' => $this->faker->text(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class NoteFactory extends Factory
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'staff_id' => fn () => User::factory()->create()->id,
|
||||
'message' => $this->faker->text,
|
||||
'message' => $this->faker->text(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ class NotificationFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'type' => $this->faker->word(),
|
||||
'notifiable_id' => $this->faker->randomNumber(),
|
||||
'notifiable_type' => $this->faker->word,
|
||||
'data' => $this->faker->text,
|
||||
'notifiable_type' => $this->faker->word(),
|
||||
'data' => $this->faker->text(),
|
||||
'read_at' => $this->faker->dateTime(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class OptionFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'poll_id' => fn () => Poll::factory()->create()->id,
|
||||
'name' => $this->faker->name,
|
||||
'name' => $this->faker->name(),
|
||||
'votes' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ class PageFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'content' => $this->faker->text,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'content' => $this->faker->text(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,16 +24,16 @@ class PeerFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'peer_id' => $this->faker->word,
|
||||
'md5_peer_id' => $this->faker->word,
|
||||
'info_hash' => $this->faker->word,
|
||||
'ip' => $this->faker->word,
|
||||
'peer_id' => $this->faker->word(),
|
||||
'md5_peer_id' => $this->faker->word(),
|
||||
'info_hash' => $this->faker->word(),
|
||||
'ip' => $this->faker->word(),
|
||||
'port' => $this->faker->randomNumber(),
|
||||
'agent' => $this->faker->word,
|
||||
'agent' => $this->faker->word(),
|
||||
'uploaded' => $this->faker->randomNumber(),
|
||||
'downloaded' => $this->faker->randomNumber(),
|
||||
'left' => $this->faker->randomNumber(),
|
||||
'seeder' => $this->faker->boolean,
|
||||
'seeder' => $this->faker->boolean(),
|
||||
'torrent_id' => fn () => Torrent::factory()->create()->id,
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'torrents.id' => fn () => Torrent::factory()->create()->id,
|
||||
|
||||
@@ -26,10 +26,10 @@ class PermissionFactory extends Factory
|
||||
return [
|
||||
'forum_id' => fn () => Forum::factory()->create()->id,
|
||||
'group_id' => fn () => Group::factory()->create()->id,
|
||||
'show_forum' => $this->faker->boolean,
|
||||
'read_topic' => $this->faker->boolean,
|
||||
'reply_topic' => $this->faker->boolean,
|
||||
'start_topic' => $this->faker->boolean,
|
||||
'show_forum' => $this->faker->boolean(),
|
||||
'read_topic' => $this->faker->boolean(),
|
||||
'reply_topic' => $this->faker->boolean(),
|
||||
'start_topic' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ class PlaylistFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'name' => $this->faker->name,
|
||||
'description' => $this->faker->text,
|
||||
'cover_image' => $this->faker->word,
|
||||
'name' => $this->faker->name(),
|
||||
'description' => $this->faker->text(),
|
||||
'cover_image' => $this->faker->word(),
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'is_private' => $this->faker->boolean,
|
||||
'is_pinned' => $this->faker->boolean,
|
||||
'is_featured' => $this->faker->boolean,
|
||||
'is_private' => $this->faker->boolean(),
|
||||
'is_pinned' => $this->faker->boolean(),
|
||||
'is_featured' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ class PollFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'title' => $this->faker->word,
|
||||
'slug' => $this->faker->slug,
|
||||
'ip_checking' => $this->faker->boolean,
|
||||
'multiple_choice' => $this->faker->boolean,
|
||||
'title' => $this->faker->word(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'ip_checking' => $this->faker->boolean(),
|
||||
'multiple_choice' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class PostFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'content' => $this->faker->text,
|
||||
'content' => $this->faker->text(),
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'topic_id' => fn () => Topic::factory()->create()->id,
|
||||
];
|
||||
|
||||
@@ -25,9 +25,9 @@ class PrivateMessageFactory extends Factory
|
||||
return [
|
||||
'sender_id' => fn () => User::factory()->create()->id,
|
||||
'receiver_id' => fn () => User::factory()->create()->id,
|
||||
'subject' => $this->faker->word,
|
||||
'message' => $this->faker->text,
|
||||
'read' => $this->faker->boolean,
|
||||
'subject' => $this->faker->word(),
|
||||
'message' => $this->faker->text(),
|
||||
'read' => $this->faker->boolean(),
|
||||
'related_to' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@ class ReportFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'type' => $this->faker->word(),
|
||||
'reporter_id' => fn () => User::factory()->create()->id,
|
||||
'staff_id' => fn () => User::factory()->create()->id,
|
||||
'title' => $this->faker->word,
|
||||
'message' => $this->faker->text,
|
||||
'title' => $this->faker->word(),
|
||||
'message' => $this->faker->text(),
|
||||
'solved' => $this->faker->randomNumber(),
|
||||
'verdict' => $this->faker->text,
|
||||
'verdict' => $this->faker->text(),
|
||||
'reported_user' => fn () => User::factory()->create()->id,
|
||||
'torrent_id' => fn () => Torrent::factory()->create()->id,
|
||||
'request_id' => fn () => TorrentRequest::factory()->create()->id,
|
||||
|
||||
@@ -22,8 +22,8 @@ class ResolutionFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'position' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ class RssFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'name' => $this->faker->name,
|
||||
'name' => $this->faker->name(),
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'staff_id' => fn () => User::factory()->create()->id,
|
||||
'is_private' => $this->faker->boolean,
|
||||
'is_torrent' => $this->faker->boolean,
|
||||
'json_torrent' => $this->faker->word,
|
||||
'is_private' => $this->faker->boolean(),
|
||||
'is_torrent' => $this->faker->boolean(),
|
||||
'json_torrent' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ class SeedboxFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'name' => $this->faker->name,
|
||||
'ip' => $this->faker->word,
|
||||
'name' => $this->faker->name(),
|
||||
'ip' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,22 +24,22 @@ class TopicFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'state' => $this->faker->word,
|
||||
'pinned' => $this->faker->boolean,
|
||||
'approved' => $this->faker->boolean,
|
||||
'denied' => $this->faker->boolean,
|
||||
'solved' => $this->faker->boolean,
|
||||
'invalid' => $this->faker->boolean,
|
||||
'bug' => $this->faker->boolean,
|
||||
'suggestion' => $this->faker->boolean,
|
||||
'implemented' => $this->faker->boolean,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'state' => $this->faker->word(),
|
||||
'pinned' => $this->faker->boolean(),
|
||||
'approved' => $this->faker->boolean(),
|
||||
'denied' => $this->faker->boolean(),
|
||||
'solved' => $this->faker->boolean(),
|
||||
'invalid' => $this->faker->boolean(),
|
||||
'bug' => $this->faker->boolean(),
|
||||
'suggestion' => $this->faker->boolean(),
|
||||
'implemented' => $this->faker->boolean(),
|
||||
'num_post' => $this->faker->randomNumber(),
|
||||
'first_post_user_id' => fn () => User::factory()->create()->id,
|
||||
'last_post_user_id' => $this->faker->randomNumber(),
|
||||
'first_post_user_username' => $this->faker->word,
|
||||
'last_post_user_username' => $this->faker->word,
|
||||
'first_post_user_username' => $this->faker->word(),
|
||||
'last_post_user_username' => $this->faker->word(),
|
||||
'last_reply_at' => $this->faker->dateTime(),
|
||||
'views' => $this->faker->randomNumber(),
|
||||
'forum_id' => fn () => Forum::factory()->create()->id,
|
||||
|
||||
@@ -29,20 +29,20 @@ class TorrentFactory extends Factory
|
||||
$selected = \random_int(0, \count($freeleech) - 1);
|
||||
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'description' => $this->faker->text,
|
||||
'mediainfo' => $this->faker->text,
|
||||
'info_hash' => $this->faker->word,
|
||||
'file_name' => $this->faker->word,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'description' => $this->faker->text(),
|
||||
'mediainfo' => $this->faker->text(),
|
||||
'info_hash' => $this->faker->word(),
|
||||
'file_name' => $this->faker->word(),
|
||||
'num_file' => $this->faker->randomNumber(),
|
||||
'size' => $this->faker->randomFloat(),
|
||||
'nfo' => $this->faker->text,
|
||||
'nfo' => $this->faker->text(),
|
||||
'leechers' => $this->faker->randomNumber(),
|
||||
'seeders' => $this->faker->randomNumber(),
|
||||
'times_completed' => $this->faker->randomNumber(),
|
||||
'category_id' => fn () => Category::factory()->create()->id,
|
||||
'announce' => $this->faker->word,
|
||||
'announce' => $this->faker->word(),
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'imdb' => $this->faker->randomNumber(),
|
||||
'tvdb' => $this->faker->randomNumber(),
|
||||
@@ -51,18 +51,18 @@ class TorrentFactory extends Factory
|
||||
'igdb' => $this->faker->randomNumber(),
|
||||
'type_id' => fn () => Type::factory()->create()->id,
|
||||
'resolution_id' => fn () => Resolution::factory()->create()->id,
|
||||
'stream' => $this->faker->boolean,
|
||||
'stream' => $this->faker->boolean(),
|
||||
'free' => $freeleech[$selected],
|
||||
'doubleup' => $this->faker->boolean,
|
||||
'highspeed' => $this->faker->boolean,
|
||||
'doubleup' => $this->faker->boolean(),
|
||||
'highspeed' => $this->faker->boolean(),
|
||||
'featured' => false,
|
||||
'status' => 1,
|
||||
'moderated_at' => \now(),
|
||||
'moderated_by' => 1,
|
||||
'anon' => $this->faker->boolean,
|
||||
'sticky' => $this->faker->boolean,
|
||||
'sd' => $this->faker->boolean,
|
||||
'internal' => $this->faker->boolean,
|
||||
'anon' => $this->faker->boolean(),
|
||||
'sticky' => $this->faker->boolean(),
|
||||
'sd' => $this->faker->boolean(),
|
||||
'internal' => $this->faker->boolean(),
|
||||
'release_year' => $this->faker->date('Y'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class TorrentFileFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'name' => $this->faker->name(),
|
||||
'size' => $this->faker->randomNumber(),
|
||||
'torrent_id' => fn () => Torrent::factory()->create()->id,
|
||||
];
|
||||
|
||||
@@ -27,7 +27,7 @@ class TorrentRequestBountyFactory extends Factory
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'seedbonus' => $this->faker->randomFloat(),
|
||||
'requests_id' => $this->faker->randomNumber(),
|
||||
'anon' => $this->faker->boolean,
|
||||
'anon' => $this->faker->boolean(),
|
||||
'request_id' => fn () => TorrentRequest::factory()->create()->id,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class TorrentRequestClaimFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'request_id' => $this->faker->randomNumber(),
|
||||
'username' => $this->faker->userName,
|
||||
'username' => $this->faker->userName(),
|
||||
'anon' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,25 +27,25 @@ class TorrentRequestFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'name' => $this->faker->name(),
|
||||
'category_id' => fn () => Category::factory()->create()->id,
|
||||
'type_id' => fn () => Type::factory()->create()->id,
|
||||
'resolution_id' => fn () => Resolution::factory()->create()->id,
|
||||
'imdb' => $this->faker->word,
|
||||
'tvdb' => $this->faker->word,
|
||||
'tmdb' => $this->faker->word,
|
||||
'mal' => $this->faker->word,
|
||||
'igdb' => $this->faker->word,
|
||||
'description' => $this->faker->text,
|
||||
'imdb' => $this->faker->word(),
|
||||
'tvdb' => $this->faker->word(),
|
||||
'tmdb' => $this->faker->word(),
|
||||
'mal' => $this->faker->word(),
|
||||
'igdb' => $this->faker->word(),
|
||||
'description' => $this->faker->text(),
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'bounty' => $this->faker->randomFloat(),
|
||||
'votes' => $this->faker->randomNumber(),
|
||||
'claimed' => $this->faker->boolean,
|
||||
'anon' => $this->faker->boolean,
|
||||
'claimed' => $this->faker->boolean(),
|
||||
'anon' => $this->faker->boolean(),
|
||||
'filled_by' => fn () => User::factory()->create()->id,
|
||||
'filled_hash' => fn () => Torrent::factory()->create()->id,
|
||||
'filled_when' => $this->faker->dateTime(),
|
||||
'filled_anon' => $this->faker->boolean,
|
||||
'filled_anon' => $this->faker->boolean(),
|
||||
'approved_by' => fn () => User::factory()->create()->id,
|
||||
'approved_when' => $this->faker->dateTime(),
|
||||
];
|
||||
|
||||
@@ -22,8 +22,8 @@ class TypeFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->name(),
|
||||
'slug' => $this->faker->slug(),
|
||||
'position' => $this->faker->randomNumber(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class UserActivationFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'token' => $this->faker->uuid,
|
||||
'token' => $this->faker->uuid(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class UserAudibleFactory extends Factory
|
||||
'room_id' => fn () => Chatroom::factory()->create()->id,
|
||||
'target_id' => fn () => User::factory()->create()->id,
|
||||
'bot_id' => fn () => Bot::factory()->create()->id,
|
||||
'status' => $this->faker->boolean,
|
||||
'status' => $this->faker->boolean(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,53 +26,53 @@ class UserFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'username' => $this->faker->unique()->userName,
|
||||
'email' => $this->faker->unique()->safeEmail,
|
||||
'username' => $this->faker->unique()->userName(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'password' => \bcrypt('secret'),
|
||||
'passkey' => \md5(\random_bytes(60)),
|
||||
'group_id' => fn () => Group::factory()->create()->id,
|
||||
'active' => true,
|
||||
'uploaded' => $this->faker->randomNumber(),
|
||||
'downloaded' => $this->faker->randomNumber(),
|
||||
'image' => $this->faker->word,
|
||||
'title' => $this->faker->word,
|
||||
'about' => $this->faker->word,
|
||||
'signature' => $this->faker->text,
|
||||
'image' => $this->faker->word(),
|
||||
'title' => $this->faker->word(),
|
||||
'about' => $this->faker->word(),
|
||||
'signature' => $this->faker->text(),
|
||||
'fl_tokens' => $this->faker->randomNumber(),
|
||||
'seedbonus' => $this->faker->randomFloat(),
|
||||
'invites' => $this->faker->randomNumber(),
|
||||
'hitandruns' => $this->faker->randomNumber(),
|
||||
'rsskey' => \md5(\random_bytes(60)),
|
||||
'chatroom_id' => fn () => Chatroom::factory()->create()->id,
|
||||
'censor' => $this->faker->boolean,
|
||||
'chat_hidden' => $this->faker->boolean,
|
||||
'hidden' => $this->faker->boolean,
|
||||
'style' => $this->faker->boolean,
|
||||
'nav' => $this->faker->boolean,
|
||||
'torrent_layout' => $this->faker->boolean,
|
||||
'torrent_filters' => $this->faker->boolean,
|
||||
'custom_css' => $this->faker->word,
|
||||
'ratings' => $this->faker->boolean,
|
||||
'read_rules' => $this->faker->boolean,
|
||||
'can_chat' => $this->faker->boolean,
|
||||
'can_comment' => $this->faker->boolean,
|
||||
'can_download' => $this->faker->boolean,
|
||||
'can_request' => $this->faker->boolean,
|
||||
'can_invite' => $this->faker->boolean,
|
||||
'can_upload' => $this->faker->boolean,
|
||||
'show_poster' => $this->faker->boolean,
|
||||
'peer_hidden' => $this->faker->boolean,
|
||||
'private_profile' => $this->faker->boolean,
|
||||
'block_notifications' => $this->faker->boolean,
|
||||
'stat_hidden' => $this->faker->boolean,
|
||||
'censor' => $this->faker->boolean(),
|
||||
'chat_hidden' => $this->faker->boolean(),
|
||||
'hidden' => $this->faker->boolean(),
|
||||
'style' => $this->faker->boolean(),
|
||||
'nav' => $this->faker->boolean(),
|
||||
'torrent_layout' => $this->faker->boolean(),
|
||||
'torrent_filters' => $this->faker->boolean(),
|
||||
'custom_css' => $this->faker->word(),
|
||||
'ratings' => $this->faker->boolean(),
|
||||
'read_rules' => $this->faker->boolean(),
|
||||
'can_chat' => $this->faker->boolean(),
|
||||
'can_comment' => $this->faker->boolean(),
|
||||
'can_download' => $this->faker->boolean(),
|
||||
'can_request' => $this->faker->boolean(),
|
||||
'can_invite' => $this->faker->boolean(),
|
||||
'can_upload' => $this->faker->boolean(),
|
||||
'show_poster' => $this->faker->boolean(),
|
||||
'peer_hidden' => $this->faker->boolean(),
|
||||
'private_profile' => $this->faker->boolean(),
|
||||
'block_notifications' => $this->faker->boolean(),
|
||||
'stat_hidden' => $this->faker->boolean(),
|
||||
'twostep' => false,
|
||||
'remember_token' => Str::random(10),
|
||||
'api_token' => $this->faker->uuid,
|
||||
'api_token' => $this->faker->uuid(),
|
||||
//'last_login' => $this->faker->dateTime(),
|
||||
'last_action' => $this->faker->dateTime(),
|
||||
//'disabled_at' => $this->faker->dateTime(),
|
||||
//'deleted_by' => $this->faker->randomNumber(),
|
||||
'locale' => $this->faker->word,
|
||||
'locale' => $this->faker->word(),
|
||||
'chat_status_id' => fn () => ChatStatus::factory()->create()->id,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,35 +24,35 @@ class UserNotificationFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'show_bon_gift' => $this->faker->boolean,
|
||||
'show_mention_forum_post' => $this->faker->boolean,
|
||||
'show_mention_article_comment' => $this->faker->boolean,
|
||||
'show_mention_request_comment' => $this->faker->boolean,
|
||||
'show_mention_torrent_comment' => $this->faker->boolean,
|
||||
'show_subscription_topic' => $this->faker->boolean,
|
||||
'show_subscription_forum' => $this->faker->boolean,
|
||||
'show_forum_topic' => $this->faker->boolean,
|
||||
'show_following_upload' => $this->faker->boolean,
|
||||
'show_request_bounty' => $this->faker->boolean,
|
||||
'show_request_comment' => $this->faker->boolean,
|
||||
'show_request_fill' => $this->faker->boolean,
|
||||
'show_request_fill_approve' => $this->faker->boolean,
|
||||
'show_request_fill_reject' => $this->faker->boolean,
|
||||
'show_request_claim' => $this->faker->boolean,
|
||||
'show_request_unclaim' => $this->faker->boolean,
|
||||
'show_torrent_comment' => $this->faker->boolean,
|
||||
'show_torrent_tip' => $this->faker->boolean,
|
||||
'show_torrent_thank' => $this->faker->boolean,
|
||||
'show_account_follow' => $this->faker->boolean,
|
||||
'show_account_unfollow' => $this->faker->boolean,
|
||||
'json_account_groups' => $this->faker->word,
|
||||
'json_bon_groups' => $this->faker->word,
|
||||
'json_mention_groups' => $this->faker->word,
|
||||
'json_request_groups' => $this->faker->word,
|
||||
'json_torrent_groups' => $this->faker->word,
|
||||
'json_forum_groups' => $this->faker->word,
|
||||
'json_following_groups' => $this->faker->word,
|
||||
'json_subscription_groups' => $this->faker->word,
|
||||
'show_bon_gift' => $this->faker->boolean(),
|
||||
'show_mention_forum_post' => $this->faker->boolean(),
|
||||
'show_mention_article_comment' => $this->faker->boolean(),
|
||||
'show_mention_request_comment' => $this->faker->boolean(),
|
||||
'show_mention_torrent_comment' => $this->faker->boolean(),
|
||||
'show_subscription_topic' => $this->faker->boolean(),
|
||||
'show_subscription_forum' => $this->faker->boolean(),
|
||||
'show_forum_topic' => $this->faker->boolean(),
|
||||
'show_following_upload' => $this->faker->boolean(),
|
||||
'show_request_bounty' => $this->faker->boolean(),
|
||||
'show_request_comment' => $this->faker->boolean(),
|
||||
'show_request_fill' => $this->faker->boolean(),
|
||||
'show_request_fill_approve' => $this->faker->boolean(),
|
||||
'show_request_fill_reject' => $this->faker->boolean(),
|
||||
'show_request_claim' => $this->faker->boolean(),
|
||||
'show_request_unclaim' => $this->faker->boolean(),
|
||||
'show_torrent_comment' => $this->faker->boolean(),
|
||||
'show_torrent_tip' => $this->faker->boolean(),
|
||||
'show_torrent_thank' => $this->faker->boolean(),
|
||||
'show_account_follow' => $this->faker->boolean(),
|
||||
'show_account_unfollow' => $this->faker->boolean(),
|
||||
'json_account_groups' => $this->faker->word(),
|
||||
'json_bon_groups' => $this->faker->word(),
|
||||
'json_mention_groups' => $this->faker->word(),
|
||||
'json_request_groups' => $this->faker->word(),
|
||||
'json_torrent_groups' => $this->faker->word(),
|
||||
'json_forum_groups' => $this->faker->word(),
|
||||
'json_following_groups' => $this->faker->word(),
|
||||
'json_subscription_groups' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,45 +24,45 @@ class UserPrivacyFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'show_achievement' => $this->faker->boolean,
|
||||
'show_bon' => $this->faker->boolean,
|
||||
'show_comment' => $this->faker->boolean,
|
||||
'show_download' => $this->faker->boolean,
|
||||
'show_follower' => $this->faker->boolean,
|
||||
'show_online' => $this->faker->boolean,
|
||||
'show_peer' => $this->faker->boolean,
|
||||
'show_post' => $this->faker->boolean,
|
||||
'show_profile' => $this->faker->boolean,
|
||||
'show_profile_about' => $this->faker->boolean,
|
||||
'show_profile_achievement' => $this->faker->boolean,
|
||||
'show_profile_badge' => $this->faker->boolean,
|
||||
'show_profile_follower' => $this->faker->boolean,
|
||||
'show_profile_title' => $this->faker->boolean,
|
||||
'show_profile_bon_extra' => $this->faker->boolean,
|
||||
'show_profile_comment_extra' => $this->faker->boolean,
|
||||
'show_profile_forum_extra' => $this->faker->boolean,
|
||||
'show_profile_request_extra' => $this->faker->boolean,
|
||||
'show_profile_torrent_count' => $this->faker->boolean,
|
||||
'show_profile_torrent_extra' => $this->faker->boolean,
|
||||
'show_profile_torrent_ratio' => $this->faker->boolean,
|
||||
'show_profile_torrent_seed' => $this->faker->boolean,
|
||||
'show_profile_warning' => $this->faker->boolean,
|
||||
'show_rank' => $this->faker->boolean,
|
||||
'show_requested' => $this->faker->boolean,
|
||||
'show_topic' => $this->faker->boolean,
|
||||
'show_upload' => $this->faker->boolean,
|
||||
'show_wishlist' => $this->faker->boolean,
|
||||
'json_profile_groups' => $this->faker->word,
|
||||
'json_torrent_groups' => $this->faker->word,
|
||||
'json_forum_groups' => $this->faker->word,
|
||||
'json_bon_groups' => $this->faker->word,
|
||||
'json_comment_groups' => $this->faker->word,
|
||||
'json_wishlist_groups' => $this->faker->word,
|
||||
'json_follower_groups' => $this->faker->word,
|
||||
'json_achievement_groups' => $this->faker->word,
|
||||
'json_rank_groups' => $this->faker->word,
|
||||
'json_request_groups' => $this->faker->word,
|
||||
'json_other_groups' => $this->faker->word,
|
||||
'show_achievement' => $this->faker->boolean(),
|
||||
'show_bon' => $this->faker->boolean(),
|
||||
'show_comment' => $this->faker->boolean(),
|
||||
'show_download' => $this->faker->boolean(),
|
||||
'show_follower' => $this->faker->boolean(),
|
||||
'show_online' => $this->faker->boolean(),
|
||||
'show_peer' => $this->faker->boolean(),
|
||||
'show_post' => $this->faker->boolean(),
|
||||
'show_profile' => $this->faker->boolean(),
|
||||
'show_profile_about' => $this->faker->boolean(),
|
||||
'show_profile_achievement' => $this->faker->boolean(),
|
||||
'show_profile_badge' => $this->faker->boolean(),
|
||||
'show_profile_follower' => $this->faker->boolean(),
|
||||
'show_profile_title' => $this->faker->boolean(),
|
||||
'show_profile_bon_extra' => $this->faker->boolean(),
|
||||
'show_profile_comment_extra' => $this->faker->boolean(),
|
||||
'show_profile_forum_extra' => $this->faker->boolean(),
|
||||
'show_profile_request_extra' => $this->faker->boolean(),
|
||||
'show_profile_torrent_count' => $this->faker->boolean(),
|
||||
'show_profile_torrent_extra' => $this->faker->boolean(),
|
||||
'show_profile_torrent_ratio' => $this->faker->boolean(),
|
||||
'show_profile_torrent_seed' => $this->faker->boolean(),
|
||||
'show_profile_warning' => $this->faker->boolean(),
|
||||
'show_rank' => $this->faker->boolean(),
|
||||
'show_requested' => $this->faker->boolean(),
|
||||
'show_topic' => $this->faker->boolean(),
|
||||
'show_upload' => $this->faker->boolean(),
|
||||
'show_wishlist' => $this->faker->boolean(),
|
||||
'json_profile_groups' => $this->faker->word(),
|
||||
'json_torrent_groups' => $this->faker->word(),
|
||||
'json_forum_groups' => $this->faker->word(),
|
||||
'json_bon_groups' => $this->faker->word(),
|
||||
'json_comment_groups' => $this->faker->word(),
|
||||
'json_wishlist_groups' => $this->faker->word(),
|
||||
'json_follower_groups' => $this->faker->word(),
|
||||
'json_achievement_groups' => $this->faker->word(),
|
||||
'json_rank_groups' => $this->faker->word(),
|
||||
'json_request_groups' => $this->faker->word(),
|
||||
'json_other_groups' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class VoterFactory extends Factory
|
||||
return [
|
||||
'poll_id' => fn () => Poll::factory()->create()->id,
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'ip_address' => $this->faker->word,
|
||||
'ip_address' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ class WarningFactory extends Factory
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'warned_by' => fn () => User::factory()->create()->id,
|
||||
'torrent' => fn () => Torrent::factory()->create()->id,
|
||||
'reason' => $this->faker->text,
|
||||
'reason' => $this->faker->text(),
|
||||
'expires_on' => $this->faker->dateTime(),
|
||||
'active' => $this->faker->boolean,
|
||||
'active' => $this->faker->boolean(),
|
||||
'deleted_by' => fn () => User::factory()->create()->id,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ class WishFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'user_id' => fn () => User::factory()->create()->id,
|
||||
'title' => $this->faker->word,
|
||||
'imdb' => $this->faker->word,
|
||||
'type' => $this->faker->word,
|
||||
'source' => $this->faker->word,
|
||||
'title' => $this->faker->word(),
|
||||
'imdb' => $this->faker->word(),
|
||||
'type' => $this->faker->word(),
|
||||
'source' => $this->faker->word(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user