You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/app/StatusHashtag.php

47 lines
730 B
PHTML

<?php
namespace App;
Staging (#6264) * StatusPipeline defensive checks * HomeFeedPipeline defensive checks * DeletePipeline defensive checks * InboxPipeline defensive checks * MediaPipeline defensive checks * PushNotificationPipeline defensive checks * LikePipeline defensive checks * FollowPipeline defensive checks * ImageOptimizePipeline defensive checks * Misc pipelines defensive checks * Update CommentPipeline.php * Update FollowPushNotifyPipeline.php * Update LikePushNotifyPipeline.php * Update FollowPushNotifyPipeline.php * Update MentionPushNotifyPipeline.php * Update MoveSendUndoFollowPipeline.php * Update RemoteFollowPipeline.php * Update FollowPushNotifyPipeline.php * Update LikePushNotifyPipeline.php * Update MentionPushNotifyPipeline.php * Update Site/Config.php - config_cache only has 1 arg. No fallback. * Update Bouncer.php - Called 'count' on Laravel collection, but could have been retrieved as a query. 🪪 larastan.noUnnecessaryCollectionCall * Update Status.php - Missing use App\Models\Conversation; * Larastan: Update UndoSharePipeline.php (Undefined variable: $status) * Update ResilientMediaStorageService.php * Update ImageS3UploadPipeline.php * Larastan: Update Profile.php missing "use App\Avatar;" * Larastan: Update MediaStorageService.php * Larastan: Update MediaPathService.php * Update MediaPathService.php * Update MediaStorageService.php * Update ImageS3UploadPipeline.php * Larastan: Update AddUserDomainBlock.php ``` ------ ------------------------------------------------------------- Line Console/Commands/AddUserDomainBlock.php ------ ------------------------------------------------------------- 37 Variable $domain in empty() always exists and is not falsy. 🪪 empty.variable ------ ------------------------------------------------------------- ``` * Larastan: Update CatchUnoptimizedMedia.php ``` ------ ------------------------------------------------------------------------------------------------- Line Console/Commands/CatchUnoptimizedMedia.php ------ ------------------------------------------------------------------------------------------------- 31 Constructor of class App\Console\Commands\CatchUnoptimizedMedia has an unused parameter $media. 🪪 constructor.unusedParameter ------ ------------------------------------------------------------------------------------------------- ``` * Update DeleteUserDomainBlock.php * Update StatusHashtag.php * Update FixLikes.php * Update User.php * Update Installer.php * Update SeedFollows.php * Update DiscoverCategory.php * Update FollowRequest.php * Update Follower.php * Update AccountController.php * Update CustomFilterKeyword.php * Update FederationController.php * Update Inbox.php * Update HttpSignature.php --------- Co-authored-by: Your Name <you@example.com> Co-authored-by: Shlee <github@shl.ee>
2 weeks ago
use App\Status;
use App\Profile;
use App\Hashtag;
use App\Media;
use Illuminate\Database\Eloquent\Model;
class StatusHashtag extends Model
{
public $fillable = [
'status_id',
'hashtag_id',
'profile_id',
'status_visibility'
];
public function status()
{
return $this->belongsTo(Status::class);
}
public function hashtag()
{
return $this->belongsTo(Hashtag::class);
}
public function profile()
{
return $this->belongsTo(Profile::class);
}
public function media()
{
return $this->hasManyThrough(
Media::class,
Status::class,
'id',
'status_id',
'status_id',
'id'
);
}
}