mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Shift cleanup
This commit is contained in:
parent
9838c0c2ef
commit
b62d1f49e4
|
@ -74,7 +74,6 @@ class ObjectImportCommand extends Command
|
||||||
$this->comment('All Items imported successfully!');
|
$this->comment('All Items imported successfully!');
|
||||||
}
|
}
|
||||||
$this->comment('');
|
$this->comment('');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function errorCallback($item, $field, $errorString)
|
public function errorCallback($item, $field, $errorString)
|
||||||
|
|
|
@ -80,7 +80,6 @@ class ItemImportRequest extends FormRequest
|
||||||
public function progress($count)
|
public function progress($count)
|
||||||
{
|
{
|
||||||
// Open for future
|
// Open for future
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function errorCallback($item, $field, $errorString)
|
public function errorCallback($item, $field, $errorString)
|
||||||
|
|
|
@ -53,6 +53,5 @@ class ConsumableImporter extends ItemImporter
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->logError($consumable, 'Consumable');
|
$this->logError($consumable, 'Consumable');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,6 @@ class UserImporter extends ItemImporter
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logError($user, 'User');
|
$this->logError($user, 'User');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Acceptable;
|
use App\Models\Traits\Acceptable;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
@ -120,7 +120,6 @@ class Accessory extends SnipeModel
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['requestable'] = filter_var($value, FILTER_VALIDATE_BOOLEAN);
|
$this->attributes['requestable'] = filter_var($value, FILTER_VALIDATE_BOOLEAN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
use Carbon;
|
use Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ class Actionlog extends SnipeModel
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
use Presentable;
|
use Presentable;
|
||||||
|
|
||||||
|
|
||||||
protected $table = 'action_logs';
|
protected $table = 'action_logs';
|
||||||
public $timestamps = true;
|
public $timestamps = true;
|
||||||
protected $fillable = ['created_at', 'item_type', 'user_id', 'item_id', 'action_type', 'note', 'target_id', 'target_type'];
|
protected $fillable = ['created_at', 'item_type', 'user_id', 'item_id', 'action_type', 'note', 'target_id', 'target_type'];
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Events\AssetCheckedOut;
|
use App\Events\AssetCheckedOut;
|
||||||
use App\Events\CheckoutableCheckedOut;
|
use App\Events\CheckoutableCheckedOut;
|
||||||
use App\Exceptions\CheckoutNotAllowed;
|
use App\Exceptions\CheckoutNotAllowed;
|
||||||
|
@ -16,6 +15,7 @@ use Auth;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
use DB;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
@ -70,7 +70,6 @@ class Asset extends Depreciable
|
||||||
|
|
||||||
// We set these as protected dates so that they will be easily accessible via Carbon
|
// We set these as protected dates so that they will be easily accessible via Carbon
|
||||||
|
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'purchase_date' => 'datetime',
|
'purchase_date' => 'datetime',
|
||||||
'last_checkout' => 'datetime',
|
'last_checkout' => 'datetime',
|
||||||
|
@ -442,7 +441,7 @@ class Asset extends Depreciable
|
||||||
*/
|
*/
|
||||||
public function assignedAssets()
|
public function assignedAssets()
|
||||||
{
|
{
|
||||||
return $this->morphMany(\App\Models\Asset::class, 'assigned', 'assigned_type', 'assigned_to')->withTrashed();
|
return $this->morphMany(self::class, 'assigned', 'assigned_type', 'assigned_to')->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Helpers\Helper;
|
use App\Helpers\Helper;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
@ -17,7 +17,6 @@ use Watson\Validating\ValidatingTrait;
|
||||||
class AssetMaintenance extends Model implements ICompanyableChild
|
class AssetMaintenance extends Model implements ICompanyableChild
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
use CompanyableChildTrait;
|
use CompanyableChildTrait;
|
||||||
use ValidatingTrait;
|
use ValidatingTrait;
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
@ -18,7 +18,6 @@ use Watson\Validating\ValidatingTrait;
|
||||||
class AssetModel extends SnipeModel
|
class AssetModel extends SnipeModel
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
protected $presenter = \App\Presenters\AssetModelPresenter::class;
|
protected $presenter = \App\Presenters\AssetModelPresenter::class;
|
||||||
use Requestable, Presentable;
|
use Requestable, Presentable;
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
use Auth;
|
use Auth;
|
||||||
use DB;
|
use DB;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Acceptable;
|
use App\Models\Traits\Acceptable;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
@ -111,7 +111,6 @@ class Consumable extends SnipeModel
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['requestable'] = filter_var($value, FILTER_VALIDATE_BOOLEAN);
|
$this->attributes['requestable'] = filter_var($value, FILTER_VALIDATE_BOOLEAN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use EasySlugger\Utf8Slugger;
|
use EasySlugger\Utf8Slugger;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Schema;
|
use Schema;
|
||||||
|
@ -13,7 +13,6 @@ use Watson\Validating\ValidatingTrait;
|
||||||
class CustomField extends Model
|
class CustomField extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use ValidatingTrait,
|
use ValidatingTrait,
|
||||||
UniqueUndeletedTrait;
|
UniqueUndeletedTrait;
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,14 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Gate;
|
use Gate;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class CustomFieldset extends Model
|
class CustomFieldset extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use ValidatingTrait;
|
use ValidatingTrait;
|
||||||
|
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class Department extends SnipeModel
|
class Department extends SnipeModel
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class Depreciation extends SnipeModel
|
class Depreciation extends SnipeModel
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class Group extends SnipeModel
|
class Group extends SnipeModel
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
use DB;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
|
@ -26,7 +26,6 @@ class License extends Depreciable
|
||||||
|
|
||||||
// We set these as protected dates so that they will be easily accessible via Carbon
|
// We set these as protected dates so that they will be easily accessible via Carbon
|
||||||
|
|
||||||
|
|
||||||
public $timestamps = true;
|
public $timestamps = true;
|
||||||
|
|
||||||
protected $guarded = 'id';
|
protected $guarded = 'id';
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use App\Models\SnipeModel;
|
use App\Models\SnipeModel;
|
||||||
|
@ -10,6 +9,7 @@ use App\Models\Traits\Searchable;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
use DB;
|
use DB;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
@ -131,7 +131,7 @@ class Location extends SnipeModel
|
||||||
|
|
||||||
public function parent()
|
public function parent()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(\App\Models\Location::class, 'parent_id', 'id')
|
return $this->belongsTo(self::class, 'parent_id', 'id')
|
||||||
->with('parent');
|
->with('parent');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class Location extends SnipeModel
|
||||||
|
|
||||||
public function children()
|
public function children()
|
||||||
{
|
{
|
||||||
return $this->hasMany(\App\Models\Location::class, 'parent_id')
|
return $this->hasMany(self::class, 'parent_id')
|
||||||
->with('children');
|
->with('children');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
|
@ -17,7 +17,6 @@ use Watson\Validating\ValidatingTrait;
|
||||||
class Setting extends Model
|
class Setting extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use Notifiable, ValidatingTrait;
|
use Notifiable, ValidatingTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,7 +14,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['purchase_date'] = $value;
|
$this->attributes['purchase_date'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +27,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['purchase_cost'] = $value;
|
$this->attributes['purchase_cost'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLocationIdAttribute($value)
|
public function setLocationIdAttribute($value)
|
||||||
|
@ -37,7 +35,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['location_id'] = $value;
|
$this->attributes['location_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCategoryIdAttribute($value)
|
public function setCategoryIdAttribute($value)
|
||||||
|
@ -47,7 +44,6 @@ class SnipeModel extends Model
|
||||||
}
|
}
|
||||||
$this->attributes['category_id'] = $value;
|
$this->attributes['category_id'] = $value;
|
||||||
// dd($this->attributes);
|
// dd($this->attributes);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSupplierIdAttribute($value)
|
public function setSupplierIdAttribute($value)
|
||||||
|
@ -56,7 +52,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['supplier_id'] = $value;
|
$this->attributes['supplier_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDepreciationIdAttribute($value)
|
public function setDepreciationIdAttribute($value)
|
||||||
|
@ -65,7 +60,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['depreciation_id'] = $value;
|
$this->attributes['depreciation_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setManufacturerIdAttribute($value)
|
public function setManufacturerIdAttribute($value)
|
||||||
|
@ -74,7 +68,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['manufacturer_id'] = $value;
|
$this->attributes['manufacturer_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMinAmtAttribute($value)
|
public function setMinAmtAttribute($value)
|
||||||
|
@ -83,7 +76,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['min_amt'] = $value;
|
$this->attributes['min_amt'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setParentIdAttribute($value)
|
public function setParentIdAttribute($value)
|
||||||
|
@ -92,7 +84,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['parent_id'] = $value;
|
$this->attributes['parent_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setFieldSetIdAttribute($value)
|
public function setFieldSetIdAttribute($value)
|
||||||
|
@ -101,7 +92,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['fieldset_id'] = $value;
|
$this->attributes['fieldset_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCompanyIdAttribute($value)
|
public function setCompanyIdAttribute($value)
|
||||||
|
@ -110,7 +100,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['company_id'] = $value;
|
$this->attributes['company_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setWarrantyMonthsAttribute($value)
|
public function setWarrantyMonthsAttribute($value)
|
||||||
|
@ -119,7 +108,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['warranty_months'] = $value;
|
$this->attributes['warranty_months'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setRtdLocationIdAttribute($value)
|
public function setRtdLocationIdAttribute($value)
|
||||||
|
@ -128,7 +116,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['rtd_location_id'] = $value;
|
$this->attributes['rtd_location_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDepartmentIdAttribute($value)
|
public function setDepartmentIdAttribute($value)
|
||||||
|
@ -137,7 +124,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['department_id'] = $value;
|
$this->attributes['department_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setManagerIdAttribute($value)
|
public function setManagerIdAttribute($value)
|
||||||
|
@ -146,7 +132,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['manager_id'] = $value;
|
$this->attributes['manager_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setModelIdAttribute($value)
|
public function setModelIdAttribute($value)
|
||||||
|
@ -155,7 +140,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['model_id'] = $value;
|
$this->attributes['model_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setStatusIdAttribute($value)
|
public function setStatusIdAttribute($value)
|
||||||
|
@ -164,7 +148,6 @@ class SnipeModel extends Model
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
}
|
||||||
$this->attributes['status_id'] = $value;
|
$this->attributes['status_id'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,16 +2,15 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class Statuslabel extends SnipeModel
|
class Statuslabel extends SnipeModel
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
use ValidatingTrait;
|
use ValidatingTrait;
|
||||||
use UniqueUndeletedTrait;
|
use UniqueUndeletedTrait;
|
||||||
|
|
|
@ -2,16 +2,15 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class Supplier extends SnipeModel
|
class Supplier extends SnipeModel
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'suppliers';
|
protected $table = 'suppliers';
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use App\Http\Traits\UniqueUndeletedTrait;
|
use App\Http\Traits\UniqueUndeletedTrait;
|
||||||
use App\Models\Traits\Searchable;
|
use App\Models\Traits\Searchable;
|
||||||
use App\Presenters\Presentable;
|
use App\Presenters\Presentable;
|
||||||
|
@ -14,6 +13,7 @@ use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
||||||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||||
use Illuminate\Contracts\Translation\HasLocalePreference;
|
use Illuminate\Contracts\Translation\HasLocalePreference;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Foundation\Auth\Access\Authorizable;
|
use Illuminate\Foundation\Auth\Access\Authorizable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
@ -330,7 +330,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
*/
|
*/
|
||||||
public function userlog()
|
public function userlog()
|
||||||
{
|
{
|
||||||
return $this->hasMany(\App\Models\Actionlog::class, 'target_id')->where('target_type', '=', \App\Models\User::class)->orderBy('created_at', 'DESC')->withTrashed();
|
return $this->hasMany(\App\Models\Actionlog::class, 'target_id')->where('target_type', '=', self::class)->orderBy('created_at', 'DESC')->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -370,7 +370,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
*/
|
*/
|
||||||
public function manager()
|
public function manager()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(\App\Models\User::class, 'manager_id')->withTrashed();
|
return $this->belongsTo(self::class, 'manager_id')->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Cache\RateLimiting\Limit;
|
use Illuminate\Cache\RateLimiting\Limit;
|
||||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
class RouteServiceProvider extends ServiceProvider
|
class RouteServiceProvider extends ServiceProvider
|
||||||
|
@ -28,8 +28,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the "web" routes for the application.
|
* Define the "web" routes for the application.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\Actionlog;
|
use App\Models\Actionlog;
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\Location;
|
use App\Models\Location;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
$factory->defineAs(App\Models\Actionlog::class, 'asset-upload', function ($faker) {
|
$factory->defineAs(App\Models\Actionlog::class, 'asset-upload', function ($faker) {
|
||||||
$asset = \App\Models\Asset::factory()->create();
|
$asset = \App\Models\Asset::factory()->create();
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -16,27 +16,6 @@ use App\Models\Category;
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// These are just for unit tests, not to generate data
|
// These are just for unit tests, not to generate data
|
||||||
|
|
||||||
class AssetFactory extends Factory
|
class AssetFactory extends Factory
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -38,33 +39,24 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Conference Phones
|
| Conference Phones
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Tablets
|
| Tablets
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Mobile Phones
|
| Mobile Phones
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Displays
|
| Displays
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
@ -21,6 +20,7 @@ use App\Models\Location;
|
||||||
use App\Models\Manufacturer;
|
use App\Models\Manufacturer;
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class CompanyFactory extends Factory
|
class CompanyFactory extends Factory
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class CustomFieldFactory extends Factory
|
class CustomFieldFactory extends Factory
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class CustomFieldsetFactory extends Factory
|
class CustomFieldsetFactory extends Factory
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
@ -21,6 +20,7 @@ use App\Models\Location;
|
||||||
use App\Models\Manufacturer;
|
use App\Models\Manufacturer;
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class GroupFactory extends Factory
|
class GroupFactory extends Factory
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -12,7 +13,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// 1
|
// 1
|
||||||
|
|
||||||
// 2
|
// 2
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
@ -21,6 +20,7 @@ use App\Models\Location;
|
||||||
use App\Models\Manufacturer;
|
use App\Models\Manufacturer;
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class LocationFactory extends Factory
|
class LocationFactory extends Factory
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Database\Factories;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -12,7 +13,6 @@ use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// 1
|
// 1
|
||||||
|
|
||||||
// 2
|
// 2
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
@ -21,6 +20,7 @@ use App\Models\Location;
|
||||||
use App\Models\Manufacturer;
|
use App\Models\Manufacturer;
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class SettingFactory extends Factory
|
class SettingFactory extends Factory
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class StatuslabelFactory extends Factory
|
class StatuslabelFactory extends Factory
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use App\Models\Category;
|
use App\Models\Category;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
@ -21,6 +20,7 @@ use App\Models\Location;
|
||||||
use App\Models\Manufacturer;
|
use App\Models\Manufacturer;
|
||||||
use App\Models\Statuslabel;
|
use App\Models\Statuslabel;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
class SupplierFactory extends Factory
|
class SupplierFactory extends Factory
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,52 +2,23 @@
|
||||||
|
|
||||||
namespace Database\Factories;
|
namespace Database\Factories;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
|
||||||
$password = bcrypt('password');
|
$password = bcrypt('password');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// USER GLOBAL PERMISSION STATES
|
// USER GLOBAL PERMISSION STATES
|
||||||
|
|
||||||
// USER ASSET PERMISSION STATES
|
// USER ASSET PERMISSION STATES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// USER ACCESSORY PERMISSION STATES
|
// USER ACCESSORY PERMISSION STATES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// USER CONSUMABLE PERMISSION STATES
|
// USER CONSUMABLE PERMISSION STATES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// USER LICENSE PERMISSION STATES
|
// USER LICENSE PERMISSION STATES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// USER COMPONENTS PERMISSION STATES
|
// USER COMPONENTS PERMISSION STATES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// USER USER PERMISSION STATES
|
// USER USER PERMISSION STATES
|
||||||
|
|
||||||
class UserFactory extends Factory
|
class UserFactory extends Factory
|
||||||
|
|
|
@ -4,6 +4,9 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Accessory;
|
use App\Models\Accessory;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class AccessorySeeder extends Seeder
|
class AccessorySeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
@ -22,22 +25,22 @@ class AccessorySeeder extends Seeder
|
||||||
|
|
||||||
foreach ($del_files as $del_file) { // iterate files
|
foreach ($del_files as $del_file) { // iterate files
|
||||||
$file_to_delete = str_replace($src, '', $del_file);
|
$file_to_delete = str_replace($src, '', $del_file);
|
||||||
\Log::debug('Deleting: '.$file_to_delete);
|
Log::debug('Deleting: '.$file_to_delete);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->delete($dst.$del_file);
|
Storage::disk('public')->delete($dst.$del_file);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_files = glob($src.'/*.*');
|
$add_files = glob($src.'/*.*');
|
||||||
foreach ($add_files as $add_file) {
|
foreach ($add_files as $add_file) {
|
||||||
$file_to_copy = str_replace($src, '', $add_file);
|
$file_to_copy = str_replace($src, '', $add_file);
|
||||||
\Log::debug('Copying: '.$file_to_copy);
|
Log::debug('Copying: '.$file_to_copy);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\AssetModel;
|
use App\Models\AssetModel;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class AssetModelSeeder extends Seeder
|
class AssetModelSeeder extends Seeder
|
||||||
|
@ -48,22 +49,22 @@ class AssetModelSeeder extends Seeder
|
||||||
|
|
||||||
foreach ($del_files as $del_file) { // iterate files
|
foreach ($del_files as $del_file) { // iterate files
|
||||||
$file_to_delete = str_replace($src, '', $del_file);
|
$file_to_delete = str_replace($src, '', $del_file);
|
||||||
\Log::debug('Deleting: '.$file_to_delete);
|
Log::debug('Deleting: '.$file_to_delete);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->delete($dst.$del_file);
|
Storage::disk('public')->delete($dst.$del_file);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_files = glob($src.'/*.*');
|
$add_files = glob($src.'/*.*');
|
||||||
foreach ($add_files as $add_file) {
|
foreach ($add_files as $add_file) {
|
||||||
$file_to_copy = str_replace($src, '', $add_file);
|
$file_to_copy = str_replace($src, '', $add_file);
|
||||||
\Log::debug('Copying: '.$file_to_copy);
|
Log::debug('Copying: '.$file_to_copy);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Asset;
|
use App\Models\Asset;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class AssetSeeder extends Seeder
|
class AssetSeeder extends Seeder
|
||||||
|
@ -39,11 +41,11 @@ class AssetSeeder extends Seeder
|
||||||
|
|
||||||
$del_files = Storage::files('assets');
|
$del_files = Storage::files('assets');
|
||||||
foreach ($del_files as $del_file) { // iterate files
|
foreach ($del_files as $del_file) { // iterate files
|
||||||
\Log::debug('Deleting: '.$del_files);
|
Log::debug('Deleting: '.$del_files);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->delete('assets'.'/'.$del_files);
|
Storage::disk('public')->delete('assets'.'/'.$del_files);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class CompanySeeder extends Seeder
|
class CompanySeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
@ -14,7 +16,7 @@ class CompanySeeder extends Seeder
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
\Log::debug('Seed companies');
|
Log::debug('Seed companies');
|
||||||
Company::truncate();
|
Company::truncate();
|
||||||
Company::factory()->count(4)->create();
|
Company::factory()->count(4)->create();
|
||||||
|
|
||||||
|
@ -24,22 +26,22 @@ class CompanySeeder extends Seeder
|
||||||
|
|
||||||
foreach ($del_files as $del_file) { // iterate files
|
foreach ($del_files as $del_file) { // iterate files
|
||||||
$file_to_delete = str_replace($src, '', $del_file);
|
$file_to_delete = str_replace($src, '', $del_file);
|
||||||
\Log::debug('Deleting: '.$file_to_delete);
|
Log::debug('Deleting: '.$file_to_delete);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->delete($dst.$del_file);
|
Storage::disk('public')->delete($dst.$del_file);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_files = glob($src.'/*.*');
|
$add_files = glob($src.'/*.*');
|
||||||
foreach ($add_files as $add_file) {
|
foreach ($add_files as $add_file) {
|
||||||
$file_to_copy = str_replace($src, '', $add_file);
|
$file_to_copy = str_replace($src, '', $add_file);
|
||||||
\Log::debug('Copying: '.$file_to_copy);
|
Log::debug('Copying: '.$file_to_copy);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Component;
|
use App\Models\Component;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class ComponentSeeder extends Seeder
|
class ComponentSeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Consumable;
|
use App\Models\Consumable;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class ConsumableSeeder extends Seeder
|
class ConsumableSeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,7 @@ use App\Models\CustomField;
|
||||||
use App\Models\CustomFieldset;
|
use App\Models\CustomFieldset;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CustomFieldSeeder extends Seeder
|
class CustomFieldSeeder extends Seeder
|
||||||
|
|
|
@ -2,18 +2,21 @@
|
||||||
|
|
||||||
namespace Database\Seeders;
|
namespace Database\Seeders;
|
||||||
|
|
||||||
use Database\Seeders\CustomFieldSeeder;
|
|
||||||
use Database\Seeders\ConsumableSeeder;
|
|
||||||
use Database\Seeders\ComponentSeeder;
|
|
||||||
use Database\Seeders\CompanySeeder;
|
|
||||||
use Database\Seeders\CategorySeeder;
|
|
||||||
use Database\Seeders\AssetSeeder;
|
|
||||||
use Database\Seeders\AssetModelSeeder;
|
|
||||||
use Database\Seeders\ActionlogSeeder;
|
|
||||||
use Database\Seeders\AccessorySeeder;
|
|
||||||
use App\Models\Setting;
|
use App\Models\Setting;
|
||||||
|
use Database\Seeders\AccessorySeeder;
|
||||||
|
use Database\Seeders\ActionlogSeeder;
|
||||||
|
use Database\Seeders\AssetModelSeeder;
|
||||||
|
use Database\Seeders\AssetSeeder;
|
||||||
|
use Database\Seeders\CategorySeeder;
|
||||||
|
use Database\Seeders\CompanySeeder;
|
||||||
|
use Database\Seeders\ComponentSeeder;
|
||||||
|
use Database\Seeders\ConsumableSeeder;
|
||||||
|
use Database\Seeders\CustomFieldSeeder;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class DatabaseSeeder extends Seeder
|
class DatabaseSeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
@ -53,7 +56,7 @@ class DatabaseSeeder extends Seeder
|
||||||
|
|
||||||
Artisan::call('snipeit:sync-asset-locations', ['--output' => 'all']);
|
Artisan::call('snipeit:sync-asset-locations', ['--output' => 'all']);
|
||||||
$output = Artisan::output();
|
$output = Artisan::output();
|
||||||
\Log::info($output);
|
Log::info($output);
|
||||||
|
|
||||||
Model::reguard();
|
Model::reguard();
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Location;
|
use App\Models\Location;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class LocationSeeder extends Seeder
|
class LocationSeeder extends Seeder
|
||||||
|
@ -19,22 +20,22 @@ class LocationSeeder extends Seeder
|
||||||
|
|
||||||
foreach ($del_files as $del_file) { // iterate files
|
foreach ($del_files as $del_file) { // iterate files
|
||||||
$file_to_delete = str_replace($src, '', $del_file);
|
$file_to_delete = str_replace($src, '', $del_file);
|
||||||
\Log::debug('Deleting: '.$file_to_delete);
|
Log::debug('Deleting: '.$file_to_delete);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->delete($dst.$del_file);
|
Storage::disk('public')->delete($dst.$del_file);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_files = glob($src.'/*.*');
|
$add_files = glob($src.'/*.*');
|
||||||
foreach ($add_files as $add_file) {
|
foreach ($add_files as $add_file) {
|
||||||
$file_to_copy = str_replace($src, '', $add_file);
|
$file_to_copy = str_replace($src, '', $add_file);
|
||||||
\Log::debug('Copying: '.$file_to_copy);
|
Log::debug('Copying: '.$file_to_copy);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\Manufacturer;
|
use App\Models\Manufacturer;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class ManufacturerSeeder extends Seeder
|
class ManufacturerSeeder extends Seeder
|
||||||
|
@ -29,22 +30,22 @@ class ManufacturerSeeder extends Seeder
|
||||||
|
|
||||||
foreach ($del_files as $del_file) { // iterate files
|
foreach ($del_files as $del_file) { // iterate files
|
||||||
$file_to_delete = str_replace($src, '', $del_file);
|
$file_to_delete = str_replace($src, '', $del_file);
|
||||||
\Log::debug('Deleting: '.$file_to_delete);
|
Log::debug('Deleting: '.$file_to_delete);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->delete($dst.$del_file);
|
Storage::disk('public')->delete($dst.$del_file);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_files = glob($src.'/*.*');
|
$add_files = glob($src.'/*.*');
|
||||||
foreach ($add_files as $add_file) {
|
foreach ($add_files as $add_file) {
|
||||||
$file_to_copy = str_replace($src, '', $add_file);
|
$file_to_copy = str_replace($src, '', $add_file);
|
||||||
\Log::debug('Copying: '.$file_to_copy);
|
Log::debug('Copying: '.$file_to_copy);
|
||||||
try {
|
try {
|
||||||
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
Storage::disk('public')->put($dst.$file_to_copy, file_get_contents($src.$file_to_copy));
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Log::debug($e);
|
Log::debug($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ namespace Database\Seeders;
|
||||||
use App\Models\Setting;
|
use App\Models\Setting;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class SettingsSeeder extends Seeder
|
class SettingsSeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\Api;
|
use App\Http\Controllers\Api;
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\SuppliersController;
|
|
||||||
use App\Http\Controllers\StatuslabelsController;
|
|
||||||
use App\Http\Controllers\DepreciationsController;
|
|
||||||
use App\Http\Controllers\DepartmentsController;
|
|
||||||
use App\Http\Controllers\CompaniesController;
|
|
||||||
use App\Http\Controllers\CategoriesController;
|
|
||||||
use App\Http\Controllers\Account;
|
use App\Http\Controllers\Account;
|
||||||
use App\Http\Controllers\ActionlogController;
|
use App\Http\Controllers\ActionlogController;
|
||||||
use App\Http\Controllers\Auth;
|
use App\Http\Controllers\Auth;
|
||||||
|
use App\Http\Controllers\CategoriesController;
|
||||||
|
use App\Http\Controllers\CompaniesController;
|
||||||
use App\Http\Controllers\DashboardController;
|
use App\Http\Controllers\DashboardController;
|
||||||
|
use App\Http\Controllers\DepartmentsController;
|
||||||
|
use App\Http\Controllers\DepreciationsController;
|
||||||
use App\Http\Controllers\GroupsController;
|
use App\Http\Controllers\GroupsController;
|
||||||
use App\Http\Controllers\HealthController;
|
use App\Http\Controllers\HealthController;
|
||||||
use App\Http\Controllers\ImportsController;
|
use App\Http\Controllers\ImportsController;
|
||||||
|
@ -19,6 +17,8 @@ use App\Http\Controllers\ModalController;
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
use App\Http\Controllers\ReportsController;
|
use App\Http\Controllers\ReportsController;
|
||||||
use App\Http\Controllers\SettingsController;
|
use App\Http\Controllers\SettingsController;
|
||||||
|
use App\Http\Controllers\StatuslabelsController;
|
||||||
|
use App\Http\Controllers\SuppliersController;
|
||||||
use App\Http\Controllers\ViewAssetsController;
|
use App\Http\Controllers\ViewAssetsController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
use App\Http\Controllers\CustomFieldsController;
|
use App\Http\Controllers\CustomFieldsController;
|
||||||
use App\Http\Controllers\CustomFieldsetsController;
|
use App\Http\Controllers\CustomFieldsetsController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Custom Fields Routes
|
* Custom Fields Routes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
use App\Http\Controllers\AssetMaintenancesController;
|
use App\Http\Controllers\AssetMaintenancesController;
|
||||||
use App\Http\Controllers\Assets;
|
use App\Http\Controllers\Assets;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Asset Routes
|
| Asset Routes
|
||||||
|
|
|
@ -14,7 +14,7 @@ use App\Models\Manufacturer;
|
||||||
use App\Models\Supplier;
|
use App\Models\Supplier;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inherited Methods
|
* Inherited Methods
|
||||||
* @method void wantToTest($text)
|
* @method void wantToTest($text)
|
||||||
* @method void wantTo($text)
|
* @method void wantTo($text)
|
||||||
|
|
Loading…
Reference in a new issue