change posts to articles

This commit is contained in:
2023-04-26 10:57:27 +10:00
parent c6d318bbc3
commit 3ee97468f9
23 changed files with 416 additions and 486 deletions

View File

@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphMany;
class Post extends Model
class Article extends Model
{
use HasFactory;
use Uuids;
@@ -28,7 +28,7 @@ class Post extends Model
/**
* Get the post user
* Get the article user
*
* @return BelongsTo
*/
@@ -38,7 +38,7 @@ class Post extends Model
}
/**
* Get all of the post's attachments.
* Get all of the article's attachments.
*
* @return MorphMany
*/

View File

@@ -34,7 +34,7 @@ class Event extends Model
/**
* Get all of the post's attachments.
* Get all of the article's attachments.
*/
public function attachments()
{

View File

@@ -142,7 +142,7 @@ class User extends Authenticatable implements Auditable
* Revoke permissions from the user
*
* @param string|array $permissions The permission(s) to revoke.
* @return int
* @return integer
*/
public function revokePermission($permissions)
{
@@ -170,9 +170,9 @@ class User extends Authenticatable implements Auditable
*
* @return HasMany
*/
public function posts()
public function articles()
{
return $this->hasMany(Post::class);
return $this->hasMany(Article::class);
}
/**