Created API endpoints

This commit is contained in:
2017-12-20 16:45:20 +07:00
parent ad11643854
commit 554c74481b
53 changed files with 4637 additions and 9 deletions

27
app/Models/Category.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Category extends Model
{
use SoftDeletes;
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = [
'updated_at',
'created_at',
'deleted_at'
];
public function creator()
{
return $this->belongsTo(User::class, 'creator_id');
}
}