Upgrade to Laravel 10
This commit is contained in:
parent
c4d7dc31d5
commit
16b120bc73
142 changed files with 1676 additions and 2019 deletions
|
@ -14,29 +14,15 @@ class Tag extends Model
|
|||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* We shall set a blacklist of non-modifiable model attributes.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
/** @var array<int, string> */
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* Define the relationship with notes.
|
||||
*
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function notes()
|
||||
public function notes(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Note::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* The bookmarks that belong to the tag.
|
||||
*
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function bookmarks()
|
||||
public function bookmarks(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany('App\Models\Bookmark');
|
||||
}
|
||||
|
@ -49,8 +35,9 @@ class Tag extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* This method actually normalizes a tag. That means lowercase-ing and
|
||||
* removing fancy diatric characters.
|
||||
* Normalizes a tag.
|
||||
*
|
||||
* That means convert to lowercase and removing fancy diatric characters.
|
||||
*/
|
||||
public static function normalize(string $tag): string
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue