Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
devmtm committed Jan 29, 2019
1 parent 9ee0b41 commit 381a9bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ class YourResource extends Resource {
Then, in resource detail page, you can see the history of your resource status.

## Images
![status](https://user-images.githubusercontent.com/41853913/51896859-0d8ee780-23b6-11e9-894f-e214382776a6.PNG)
4 changes: 4 additions & 0 deletions src/Models/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ public function getDateAttribute() {
return $this->created_at? $this->created_at->format('Y-m-d H:i') : '';
}

public function getCreatorNameAttribute() {
return $this->creator? $this->creator->name?? '' : '';
}

}
2 changes: 2 additions & 0 deletions src/Resources/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public function fields(Request $request)
return [
Text::make('Status', 'status'),
Text::make('Date', 'date'),
Text::make('By', 'creator-name'),
Text::make('Note', 'note'),
];
}

Expand Down

0 comments on commit 381a9bc

Please sign in to comment.