migration up
This commit is contained in:
@ -4,7 +4,7 @@ namespace app\models;
|
||||
use \Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Answer extends Model {
|
||||
protected $table = 'AnswerController';
|
||||
protected $table = 'answer';
|
||||
protected $fillable = ['answer','user_id','question_id'];
|
||||
|
||||
public function upvotes()
|
||||
|
@ -4,6 +4,6 @@ namespace app\models;
|
||||
use \Illuminate\Database\Eloquent\Model;
|
||||
class Post extends Model
|
||||
{
|
||||
protected $table = 'Posts';
|
||||
protected $table = 'post';
|
||||
protected $fillable = ['post', 'user_id'];
|
||||
}
|
@ -4,7 +4,7 @@ namespace app\models;
|
||||
use \Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Question extends Model {
|
||||
protected $table = 'Questions';
|
||||
protected $table = 'question';
|
||||
protected $fillable = ['question','user_id'];
|
||||
|
||||
public function answers()
|
||||
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
namespace app\models;
|
||||
|
||||
use \Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Upvote extends Model {
|
||||
protected $table = 'Upvotes';
|
||||
protected $fillable = ['answer_id', 'user_id'];
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace app\models;
|
||||
use \Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class User extends Model {
|
||||
protected $table = 'user';
|
||||
protected $fillable = ['username', 'email', 'role'];
|
||||
protected $fillable = ['username', 'email', 'password_hash', 'role'];
|
||||
protected $dates = ['deleted at'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user