芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/yeahea.digitalhubbd.com/app/Models/BlogComment.php
belongsTo(Post::class); } /** * Get the author associated with the blog post. */ public function author() { return $this->belongsTo(User::class, 'user_id')->withDefault(); } /** * Scope a query to only include published comments. * * @return \Illuminate\Database\Eloquent\Builder */ public function scopePublished($query) { return $query->where('approved', 1); } /** * Scope a query to only include published comments. * * @return \Illuminate\Database\Eloquent\Builder */ public function scopeUnPublished($query) { return $query->where('approved', '!=', 1); } }