Basic bookmarks functionality

This commit is contained in:
Jonny Barnes 2017-10-10 15:58:07 +01:00
parent b840d164ed
commit 13e6ff1d0f
10 changed files with 173 additions and 0 deletions

23
app/Bookmark.php Normal file
View file

@ -0,0 +1,23 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Bookmark extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['url', 'name', 'content'];
/**
* The tags that belong to the bookmark.
*/
public function tags()
{
return $this->belongsToMany('App\Tag');
}
}