aboutsummaryrefslogtreecommitdiffhomepage
path: root/api/Posts/Models
diff options
context:
space:
mode:
authorMarvin Borner2018-10-30 18:41:29 +0100
committerMarvin Borner2018-10-30 18:41:29 +0100
commit39aa8530424310663c888f9e02224158961532e3 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /api/Posts/Models
parentbd568608bcda0729044e823aedfa799e10692e14 (diff)
PHP is crap
Diffstat (limited to 'api/Posts/Models')
-rw-r--r--api/Posts/Models/MediaPost.php28
-rw-r--r--api/Posts/Models/Post.php41
-rw-r--r--api/Posts/Models/PostType.php19
-rw-r--r--api/Posts/Models/TextPost.php28
4 files changed, 0 insertions, 116 deletions
diff --git a/api/Posts/Models/MediaPost.php b/api/Posts/Models/MediaPost.php
deleted file mode 100644
index e6f1629..0000000
--- a/api/Posts/Models/MediaPost.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-namespace Api\Posts\Models;
-
-use Laravel\Passport\HasApiTokens;
-use Illuminate\Notifications\Notifiable;
-use Illuminate\Database\Eloquent\Model;
-
-class MediaPost extends Model
-{
- use HasApiTokens, Notifiable;
-
- protected $table = "media_posts";
-
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $fillable = [
- 'description', 'media_path'
- ];
-
- public function post()
- {
- return $this->belongsTo('Api\Posts\Models\Post');
- }
-}
diff --git a/api/Posts/Models/Post.php b/api/Posts/Models/Post.php
deleted file mode 100644
index b907808..0000000
--- a/api/Posts/Models/Post.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-namespace Api\Posts\Models;
-
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Notifications\Notifiable;
-use Laravel\Passport\HasApiTokens;
-
-class Post extends Model
-{
- use HasApiTokens, Notifiable;
-
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $fillable = [
- 'post_types_id', 'user_id'
- ];
-
- public function user()
- {
- return $this->belongsTo('Api\Users\Models\User');
- }
-
- public function post_type()
- {
- return $this->belongsTo('Api\Posts\Models\PostType', 'post_types_id', 'id');
- }
-
- public function media_post()
- {
- return $this->hasOne('Api\Posts\Models\MediaPost');
- }
-
- public function text_post()
- {
- return $this->hasOne('Api\Posts\Models\TextPost');
- }
-}
diff --git a/api/Posts/Models/PostType.php b/api/Posts/Models/PostType.php
deleted file mode 100644
index de8d0f3..0000000
--- a/api/Posts/Models/PostType.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-namespace Api\Posts\Models;
-
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Notifications\Notifiable;
-use Laravel\Passport\HasApiTokens;
-
-class PostType extends Model
-{
- use HasApiTokens, Notifiable;
-
- protected $table = "post_types";
-
- public function posts()
- {
- return $this->hasMany('Api\Posts\Models\Post', 'post_types_id', 'id');
- }
-}
diff --git a/api/Posts/Models/TextPost.php b/api/Posts/Models/TextPost.php
deleted file mode 100644
index 30593a1..0000000
--- a/api/Posts/Models/TextPost.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-namespace Api\Posts\Models;
-
-use Laravel\Passport\HasApiTokens;
-use Illuminate\Notifications\Notifiable;
-use Illuminate\Database\Eloquent\Model;
-
-class TextPost extends Model
-{
- use HasApiTokens, Notifiable;
-
- protected $table = "text_posts";
-
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $fillable = [
- 'description', 'text'
- ];
-
- public function post()
- {
- return $this->belongsTo('Api\Posts\Models\Post');
- }
-}