-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,47 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
|
||
## [Unreleased] | ||
|
||
## [unreleased] | ||
- Activity log service support | ||
## [7.0.0] - 2021-05-09 | ||
|
||
### Added | ||
|
||
- First project release | ||
|
||
## [7.0.1] - 2021-06-15 | ||
### Added | ||
|
||
### Fixed | ||
|
||
- Fix base query paramns dates validation | ||
|
||
## [7.0.1.1] - 2021-06-15 | ||
|
||
### Changed | ||
|
||
- Add controllers methods success and fail messages | ||
- Improve CRUD methods services | ||
|
||
### Added | ||
|
||
- Add new dictionaries words | ||
|
||
## [7.0.2] - 2021-07-30 | ||
|
||
### Fixed | ||
|
||
- Remove query params request include transformation | ||
|
||
### Added | ||
|
||
- Add git merge pull cli | ||
- Create git cmd shortcuts | ||
- Repository soft delete trait methods | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pull: | ||
git pull origin develop | ||
|
||
git: | ||
bash git-cli.sh | ||
|
||
merge: | ||
git checkout master | ||
git pull origin master | ||
git merge develop | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
############################################################################### | ||
# Git Script # | ||
# # | ||
# Author: Victor Tesoura Júnior <[email protected]> # | ||
############################################################################### | ||
# # | ||
# This script, is to be used after a approved pull request in main repo # | ||
# branch. # | ||
# # | ||
############################################################################### | ||
|
||
|
||
git checkout develop | ||
git fetch -p | ||
git pull origin develop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/Repositories/Interfaces/CoreSoftDeleteRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Txsoura\Core\Repositories\Interfaces; | ||
|
||
interface CoreSoftDeleteRepositoryInterface | ||
{ | ||
public function findWithTrased($id); | ||
|
||
public function findOrFailWithTrased($id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Txsoura\Core\Services\Traits; | ||
|
||
trait SoftDeleteMethodsRepository | ||
{ | ||
/** | ||
* @param int $id | ||
* @return Model|null | ||
*/ | ||
public function findWithTrased($id) | ||
{ | ||
return $this->model()::withTrashed() | ||
->where('id', $id) | ||
->when(key_exists('include', $this->request), function ($query) { | ||
return $query->with(explode(',', $this->request['include'])); | ||
}) | ||
->first(); | ||
} | ||
|
||
/** | ||
* @param int $id | ||
* @return Model|null | ||
*/ | ||
public function findOrFailWithTrased($id) | ||
{ | ||
return $this->model()::withTrashed() | ||
->where('id', $id) | ||
->when(key_exists('include', $this->request), function ($query) { | ||
return $query->with(explode(',', $this->request['include'])); | ||
}) | ||
->firstOrFail(); | ||
} | ||
} |