Upgrade to Laravel 10

This commit is contained in:
Jonny Barnes 2023-02-18 09:34:57 +00:00
parent c4d7dc31d5
commit 16b120bc73
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
142 changed files with 1676 additions and 2019 deletions

View file

@ -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
{