mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Move some stuff around.
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* BaseModel.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
/**
|
||||
* Class BaseModel
|
||||
*
|
||||
* @package FireflyIII\Models
|
||||
*/
|
||||
class BaseModel extends Model
|
||||
{
|
||||
/**
|
||||
* @param $query
|
||||
* @param $table
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isJoined($query, $table)
|
||||
{
|
||||
$joins = $query->getQuery()->joins;
|
||||
if($joins == null) {
|
||||
return false;
|
||||
}
|
||||
foreach ($joins as $join) {
|
||||
if ($join->table == $table) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Crypt;
|
||||
use FireflyIII\Support\Models\TransactionJournalSupport;
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -58,7 +59,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
|
||||
*
|
||||
*/
|
||||
class TransactionJournal extends BaseModel
|
||||
class TransactionJournal extends TransactionJournalSupport
|
||||
{
|
||||
use SoftDeletes, ValidatingTrait;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user