Would be nice to remove the references as well...

This commit is contained in:
James Cole
2018-02-09 19:28:16 +01:00
parent 0f09a9db4d
commit e69e6c1ce8
15 changed files with 28 additions and 28 deletions

View File

@@ -88,9 +88,9 @@ class TransactionJournal extends Model
*/
public static function routeBinder(string $value): TransactionJournal
{
if ($guard->check()) {
if (auth()->check()) {
$journalId = intval($value);
$journal = $guard->user()->transactionJournals()->where('transaction_journals.id', $journalId)
$journal = auth()->user()->transactionJournals()->where('transaction_journals.id', $journalId)
->first(['transaction_journals.*']);
if (!is_null($journal)) {
return $journal;