mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -85,7 +85,7 @@ class Category extends Model
|
||||
use SoftDeletes;
|
||||
|
||||
protected $casts
|
||||
= [
|
||||
= [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
@@ -94,7 +94,7 @@ class Category extends Model
|
||||
|
||||
protected $fillable = ['user_id', 'user_group_id', 'name'];
|
||||
|
||||
protected $hidden = ['encrypted'];
|
||||
protected $hidden = ['encrypted'];
|
||||
|
||||
/**
|
||||
* Route binder. Converts the key in the URL to the specified object (or throw 404).
|
||||
@@ -107,10 +107,10 @@ class Category extends Model
|
||||
$categoryId = (int)$value;
|
||||
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$user = auth()->user();
|
||||
|
||||
/** @var null|Category $category */
|
||||
$category = $user->categories()->find($categoryId);
|
||||
$category = $user->categories()->find($categoryId);
|
||||
if (null !== $category) {
|
||||
return $category;
|
||||
}
|
||||
|
Reference in New Issue
Block a user