mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 23:19:42 -08:00
Merge branch 'develop'
This commit is contained in:
commit
f21c7ba312
|
@ -91,7 +91,7 @@ class AssetModelsController extends Controller
|
|||
|
||||
$image = Input::file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/models/');
|
||||
$path = app('models_upload_path');
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
|
@ -191,15 +191,14 @@ class AssetModelsController extends Controller
|
|||
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
|
||||
}
|
||||
|
||||
$model->depreciation_id = $request->input('depreciation_id');
|
||||
$model->eol = $request->input('eol');
|
||||
$model->depreciation_id = $request->input('depreciation_id');
|
||||
$model->eol = $request->input('eol');
|
||||
$model->name = $request->input('name');
|
||||
$model->model_number = $request->input('model_number');
|
||||
$model->manufacturer_id = $request->input('manufacturer_id');
|
||||
$model->category_id = $request->input('category_id');
|
||||
$model->notes = $request->input('notes');
|
||||
|
||||
$model->requestable = Input::has('requestable');
|
||||
$model->requestable = $request->input('requestable', '0');
|
||||
|
||||
if ($request->input('custom_fieldset')=='') {
|
||||
$model->fieldset_id = null;
|
||||
|
@ -207,35 +206,38 @@ class AssetModelsController extends Controller
|
|||
$model->fieldset_id = $request->input('custom_fieldset');
|
||||
}
|
||||
|
||||
if (Input::file('image')) {
|
||||
$old_image = $model->image;
|
||||
|
||||
$image = Input::file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/models/');
|
||||
$old_image = $path.$model->image;
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$model->image = null;
|
||||
}
|
||||
|
||||
try {
|
||||
unlink($old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = $model->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path.'/'.$file_name);
|
||||
})->save(app('models_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move($path, $file_name);
|
||||
$image->move(app('models_upload_path'), $file_name);
|
||||
}
|
||||
$model->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ($request->input('image_delete') == 1 && Input::file('image') == "") {
|
||||
$model->image = null;
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('models_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($model->save()) {
|
||||
return redirect()->route("models.index")->with('success', trans('admin/models/message.update.success'));
|
||||
}
|
||||
|
|
|
@ -148,17 +148,35 @@ class CategoriesController extends Controller
|
|||
$category->require_acceptance = $request->input('require_acceptance', '0');
|
||||
$category->checkin_email = $request->input('checkin_email', '0');
|
||||
|
||||
$old_image = $category->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$category->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/categories/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$file_name = $category->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('categories_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('categories_upload_path'), $file_name);
|
||||
}
|
||||
$category->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$category->image = null;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('categories_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -110,17 +110,35 @@ final class CompaniesController extends Controller
|
|||
|
||||
$company->name = $request->input('name');
|
||||
|
||||
$old_image = $company->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$company->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/companies/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$file_name = $company->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('companies_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('companies_upload_path'), $file_name);
|
||||
}
|
||||
$company->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$company->image = null;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('companies_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -152,21 +152,38 @@ class DepartmentsController extends Controller
|
|||
}
|
||||
|
||||
$department->fill($request->all());
|
||||
$department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null);
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/departments/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$department->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$old_image = $department->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$department->image = null;
|
||||
}
|
||||
|
||||
$department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null);
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = $department->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('departments_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('departments_upload_path'), $file_name);
|
||||
}
|
||||
$department->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('departments_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
if ($department->save()) {
|
||||
return redirect()->route("departments.index")->with('success', trans('admin/departments/message.update.success'));
|
||||
|
|
|
@ -204,17 +204,35 @@ class LocationsController extends Controller
|
|||
$location->ldap_ou = $request->input('ldap_ou');
|
||||
$location->manager_id = $request->input('manager_id');
|
||||
|
||||
$old_image = $location->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$location->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/locations/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$file_name = $location->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('locations_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('locations_upload_path'), $file_name);
|
||||
}
|
||||
$location->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$location->image = null;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('locations_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -138,26 +138,35 @@ class ManufacturersController extends Controller
|
|||
$manufacturer->support_phone = $request->input('support_phone');
|
||||
$manufacturer->support_email = $request->input('support_email');
|
||||
|
||||
$old_image = $manufacturer->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$manufacturer->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_slug($image->getClientOriginalName()).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/manufacturers/'.$file_name);
|
||||
$old_image = $path.$manufacturer->image;
|
||||
$file_name = $manufacturer->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('manufacturers_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('manufacturers_upload_path'), $file_name);
|
||||
}
|
||||
$manufacturer->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink($old_image);
|
||||
unlink(app('manufacturers_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
|
||||
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$manufacturer->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$manufacturer->image = null;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -159,19 +159,38 @@ class SuppliersController extends Controller
|
|||
$supplier->notes = request('notes');
|
||||
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = str_random(25).".".$image->getClientOriginalExtension();
|
||||
$path = public_path('uploads/suppliers/'.$file_name);
|
||||
Image::make($image->getRealPath())->resize(200, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save($path);
|
||||
$supplier->image = $file_name;
|
||||
} elseif ($request->input('image_delete')=='1') {
|
||||
$old_image = $supplier->image;
|
||||
|
||||
// Set the model's image property to null if the image is being deleted
|
||||
if ($request->input('image_delete') == 1) {
|
||||
$supplier->image = null;
|
||||
}
|
||||
|
||||
if ($request->file('image')) {
|
||||
$image = $request->file('image');
|
||||
$file_name = $supplier->id.'-'.str_slug($image->getClientOriginalName()) . "." . $image->getClientOriginalExtension();
|
||||
|
||||
if ($image->getClientOriginalExtension()!='svg') {
|
||||
Image::make($image->getRealPath())->resize(500, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
})->save(app('suppliers_upload_path').$file_name);
|
||||
} else {
|
||||
$image->move(app('suppliers_upload_path'), $file_name);
|
||||
}
|
||||
$supplier->image = $file_name;
|
||||
|
||||
}
|
||||
|
||||
if ((($request->file('image')) && (isset($old_image)) && ($old_image!='')) || ($request->input('image_delete') == 1)) {
|
||||
try {
|
||||
unlink(app('suppliers_upload_path').$old_image);
|
||||
} catch (\Exception $e) {
|
||||
\Log::error($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($supplier->save()) {
|
||||
return redirect()->route('suppliers.index')->with('success', trans('admin/suppliers/message.update.success'));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class CustomFieldRequest extends FormRequest
|
|||
*/
|
||||
public function rules(Request $request)
|
||||
{
|
||||
|
||||
|
||||
$rules = [];
|
||||
|
||||
switch($this->method())
|
||||
|
@ -37,6 +37,18 @@ class CustomFieldRequest extends FormRequest
|
|||
break;
|
||||
}
|
||||
|
||||
// Save all fields
|
||||
case 'PUT':
|
||||
$rules['name'] = "required";
|
||||
break;
|
||||
|
||||
// Save only what's passed
|
||||
case 'PATCH':
|
||||
{
|
||||
$rules['name'] = "required";
|
||||
break;
|
||||
}
|
||||
|
||||
default:break;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class AssetModelsTransformer
|
|||
'id' => (int) $assetmodel->manufacturer->id,
|
||||
'name'=> e($assetmodel->manufacturer->name)
|
||||
] : null,
|
||||
'image' => ($assetmodel->image!='') ? url('/').'/uploads/models/'.e($assetmodel->image) : null,
|
||||
'image' => ($assetmodel->image!='') ? app('models_upload_url').e($assetmodel->image) : null,
|
||||
'model_number' => e($assetmodel->model_number),
|
||||
'depreciation' => ($assetmodel->depreciation) ? [
|
||||
'id' => (int) $assetmodel->depreciation->id,
|
||||
|
|
|
@ -25,7 +25,7 @@ class CategoriesTransformer
|
|||
$array = [
|
||||
'id' => (int) $category->id,
|
||||
'name' => e($category->name),
|
||||
'image' => ($category->image) ? e(url('/').'/uploads/categories/'.e($category->image)) : null,
|
||||
'image' => ($category->image) ? app('categories_upload_url').e($category->image) : null,
|
||||
'type' => e($category->category_type),
|
||||
'eula' => ($category->getEula()) ? true : false,
|
||||
'checkin_email' => ($category->checkin_email =='1') ? true : false,
|
||||
|
|
|
@ -25,7 +25,7 @@ class CompaniesTransformer
|
|||
$array = [
|
||||
'id' => (int) $company->id,
|
||||
'name' => e($company->name),
|
||||
'image' => ($company->image) ? e(url('/').'/uploads/companies/'.e($company->image)) : null,
|
||||
'image' => ($company->image) ? app('companies_upload_url').e($company->image) : null,
|
||||
"created_at" => Helper::getFormattedDateObject($company->created_at, 'datetime'),
|
||||
"updated_at" => Helper::getFormattedDateObject($company->updated_at, 'datetime'),
|
||||
"assets_count" => (int) $company->assets_count,
|
||||
|
|
|
@ -25,7 +25,7 @@ class DepartmentsTransformer
|
|||
$array = [
|
||||
'id' => (int) $department->id,
|
||||
'name' => e($department->name),
|
||||
'image' => ($department->image) ? e(url('/').'/uploads/departments/'.e($department->image)) : null,
|
||||
'image' => ($department->image) ? app('departments_upload_url').e($department->image) : null,
|
||||
'company' => ($department->company) ? [
|
||||
'id' => (int) $department->company->id,
|
||||
'name'=> e($department->company->name)
|
||||
|
|
|
@ -33,7 +33,7 @@ class LocationsTransformer
|
|||
$array = [
|
||||
'id' => (int) $location->id,
|
||||
'name' => e($location->name),
|
||||
'image' => ($location->image) ? e(url('/').'/uploads/locations/'.e($location->image)) : null,
|
||||
'image' => ($location->image) ? app('locations_upload_url').e($location->image) : null,
|
||||
'address' => e($location->address),
|
||||
'city' => e($location->city),
|
||||
'state' => e($location->state),
|
||||
|
|
|
@ -26,7 +26,7 @@ class ManufacturersTransformer
|
|||
'id' => (int) $manufacturer->id,
|
||||
'name' => e($manufacturer->name),
|
||||
'url' => e($manufacturer->url),
|
||||
'image' => ($manufacturer->image) ? e(url('/').'/uploads/manufacturers/'.e($manufacturer->image)) : null,
|
||||
'image' => ($manufacturer->image) ? app('manufacturers_upload_url').e($manufacturer->image) : null,
|
||||
'support_url' => e($manufacturer->support_url),
|
||||
'support_phone' => e($manufacturer->support_phone),
|
||||
'support_email' => e($manufacturer->support_email),
|
||||
|
|
|
@ -25,7 +25,7 @@ class SuppliersTransformer
|
|||
$array = [
|
||||
'id' => (int) $supplier->id,
|
||||
'name' => e($supplier->name),
|
||||
'image' => ($supplier->image) ? e(url('/').'/uploads/suppliers/'.e($supplier->image)) : null,
|
||||
'image' => ($supplier->image) ? app('suppliers_upload_url').e($supplier->image) : null,
|
||||
'address' => ($supplier->address) ? e($supplier->address) : null,
|
||||
'address2' => ($supplier->address2) ? e($supplier->address2) : null,
|
||||
'city' => ($supplier->city) ? e($supplier->city) : null,
|
||||
|
|
|
@ -694,7 +694,7 @@ class Asset extends Depreciable
|
|||
|
||||
public function scopeDeleted($query)
|
||||
{
|
||||
return $query->whereNotNull('deleted_at');
|
||||
return $query->whereNotNull('assets.deleted_at');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Validator;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use DB;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use App\Observers\AssetObserver;
|
||||
|
@ -19,7 +18,7 @@ use App\Models\Component;
|
|||
|
||||
|
||||
/**
|
||||
* This service provider handles a few custom validation rules.
|
||||
* This service provider handles setting the observers on models
|
||||
*
|
||||
* PHP version 5.5.9
|
||||
* @version v3.0
|
||||
|
@ -42,82 +41,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
Component::observe(ComponentObserver::class);
|
||||
Consumable::observe(ConsumableObserver::class);
|
||||
License::observe(LicenseObserver::class);
|
||||
|
||||
// Email array validator
|
||||
Validator::extend('email_array', function ($attribute, $value, $parameters, $validator) {
|
||||
$value = str_replace(' ', '', $value);
|
||||
$array = explode(',', $value);
|
||||
|
||||
foreach ($array as $email) { //loop over values
|
||||
$email_to_validate['alert_email'][]=$email;
|
||||
}
|
||||
|
||||
$rules = array('alert_email.*'=>'email');
|
||||
$messages = array(
|
||||
'alert_email.*'=>trans('validation.email_array')
|
||||
);
|
||||
|
||||
$validator = Validator::make($email_to_validate, $rules, $messages);
|
||||
|
||||
return $validator->passes();
|
||||
|
||||
});
|
||||
|
||||
// Unique only if undeleted
|
||||
// This works around the use case where multiple deleted items have the same unique attribute.
|
||||
// (I think this is a bug in Laravel's validator?)
|
||||
Validator::extend('unique_undeleted', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
if (count($parameters)) {
|
||||
$count = DB::table($parameters[0])->select('id')->where($attribute, '=', $value)->whereNull('deleted_at')->where('id', '!=', $parameters[1])->count();
|
||||
return $count < 1;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Yo dawg. I heard you like validators.
|
||||
// This validates the custom validator regex in custom fields.
|
||||
// We're just checking that the regex won't throw an exception, not
|
||||
// that it's actually correct for what the user intended.
|
||||
|
||||
Validator::extend('valid_regex', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
// Make sure it's not just an ANY format
|
||||
if ($value!='') {
|
||||
|
||||
// Check that the string starts with regex:
|
||||
if (strpos($value, 'regex:') === FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$test_string = 'My hovercraft is full of eels';
|
||||
|
||||
// We have to stip out the regex: part here to check with preg_match
|
||||
$test_pattern = str_replace('regex:','', $value);
|
||||
|
||||
try {
|
||||
preg_match($test_pattern, $test_string, $matches);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Share common setting variables with all views.
|
||||
view()->composer('*', function ($view) {
|
||||
$view->with('snipeSettings', \App\Models\Setting::getSettings());
|
||||
});
|
||||
|
||||
// Set the monetary locale to the configured locale to make helper::parseFloat work.
|
||||
setlocale(LC_MONETARY, config('app.locale'));
|
||||
setlocale(LC_NUMERIC, config('app.locale'));
|
||||
|
||||
}
|
||||
|
||||
|
@ -132,7 +56,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
$log_level = config('app.log_level');
|
||||
|
||||
if (($this->app->environment('production')) && (config('services.rollbar.access_token'))){
|
||||
$this->app->register(\Jenssegers\Rollbar\RollbarServiceProvider::class);
|
||||
$this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class);
|
||||
}
|
||||
|
||||
foreach ($monolog->getHandlers() as $handler) {
|
||||
|
|
131
app/Providers/SettingsServiceProvider.php
Normal file
131
app/Providers/SettingsServiceProvider.php
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use DB;
|
||||
use Log;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This service provider handles sharing the snipeSettings variable, and sets
|
||||
* some common upload path and image urls.
|
||||
*
|
||||
* PHP version 5.5.9
|
||||
* @version v3.0
|
||||
*/
|
||||
|
||||
class SettingsServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Custom email array validation
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
|
||||
|
||||
// Share common setting variables with all views.
|
||||
view()->composer('*', function ($view) {
|
||||
$view->with('snipeSettings', \App\Models\Setting::getSettings());
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Set some common variables so that they're globally available.
|
||||
* The paths should always be public (versus private uploads)
|
||||
*/
|
||||
// Model paths and URLs
|
||||
\App::singleton('models_upload_path', function(){
|
||||
return public_path('/uploads/models/');
|
||||
});
|
||||
|
||||
\App::singleton('models_upload_url', function(){
|
||||
return url('/').'/uploads/models/';
|
||||
});
|
||||
|
||||
// Categories
|
||||
\App::singleton('categories_upload_path', function(){
|
||||
return public_path('/uploads/categories/');
|
||||
});
|
||||
|
||||
\App::singleton('categories_upload_url', function(){
|
||||
return url('/').'/uploads/categories/';
|
||||
});
|
||||
|
||||
// Locations
|
||||
\App::singleton('locations_upload_path', function(){
|
||||
return public_path('/uploads/locations/');
|
||||
});
|
||||
|
||||
\App::singleton('locations_upload_url', function(){
|
||||
return url('/').'/uploads/locations/';
|
||||
});
|
||||
|
||||
// Users
|
||||
\App::singleton('users_upload_path', function(){
|
||||
return public_path('/uploads/users/');
|
||||
});
|
||||
|
||||
\App::singleton('users_upload_url', function(){
|
||||
return url('/').'/uploads/users/';
|
||||
});
|
||||
|
||||
// Manufacturers
|
||||
\App::singleton('manufacturers_upload_path', function(){
|
||||
return public_path('/uploads/manufacturers/');
|
||||
});
|
||||
|
||||
\App::singleton('manufacturers_upload_url', function(){
|
||||
return url('/').'/uploads/manufacturers/';
|
||||
});
|
||||
|
||||
// Suppliers
|
||||
\App::singleton('suppliers_upload_path', function(){
|
||||
return public_path('/uploads/suppliers/');
|
||||
});
|
||||
|
||||
\App::singleton('suppliers_upload_url', function(){
|
||||
return url('/').'/uploads/suppliers/';
|
||||
});
|
||||
|
||||
// Departments
|
||||
\App::singleton('departments_upload_path', function(){
|
||||
return public_path('/uploads/departments/');
|
||||
});
|
||||
|
||||
\App::singleton('departments_upload_url', function(){
|
||||
return url('/').'/uploads/departments/';
|
||||
});
|
||||
|
||||
// Company paths and URLs
|
||||
\App::singleton('companies_upload_path', function(){
|
||||
return public_path('/uploads/companies/');
|
||||
});
|
||||
|
||||
\App::singleton('companies_upload_url', function(){
|
||||
return url('/').'/uploads/companies/';
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Set the monetary locale to the configured locale to make helper::parseFloat work.
|
||||
setlocale(LC_MONETARY, config('app.locale'));
|
||||
setlocale(LC_NUMERIC, config('app.locale'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
117
app/Providers/ValidationServiceProvider.php
Normal file
117
app/Providers/ValidationServiceProvider.php
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use DB;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use App\Observers\AssetObserver;
|
||||
use App\Observers\LicenseObserver;
|
||||
use App\Observers\AccessoryObserver;
|
||||
use App\Observers\ConsumableObserver;
|
||||
use App\Observers\ComponentObserver;
|
||||
use App\Models\Asset;
|
||||
use App\Models\License;
|
||||
use App\Models\Accessory;
|
||||
use App\Models\Consumable;
|
||||
use App\Models\Component;
|
||||
|
||||
|
||||
/**
|
||||
* This service provider handles a few custom validation rules.
|
||||
*
|
||||
* PHP version 5.5.9
|
||||
* @version v3.0
|
||||
*/
|
||||
|
||||
class ValidationServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Custom email array validation
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
|
||||
// Email array validator
|
||||
Validator::extend('email_array', function ($attribute, $value, $parameters, $validator) {
|
||||
$value = str_replace(' ', '', $value);
|
||||
$array = explode(',', $value);
|
||||
|
||||
foreach ($array as $email) { //loop over values
|
||||
$email_to_validate['alert_email'][]=$email;
|
||||
}
|
||||
|
||||
$rules = array('alert_email.*'=>'email');
|
||||
$messages = array(
|
||||
'alert_email.*'=>trans('validation.email_array')
|
||||
);
|
||||
|
||||
$validator = Validator::make($email_to_validate, $rules, $messages);
|
||||
|
||||
return $validator->passes();
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Unique only if undeleted
|
||||
// This works around the use case where multiple deleted items have the same unique attribute.
|
||||
// (I think this is a bug in Laravel's validator?)
|
||||
Validator::extend('unique_undeleted', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
if (count($parameters)) {
|
||||
$count = DB::table($parameters[0])->select('id')->where($attribute, '=', $value)->whereNull('deleted_at')->where('id', '!=', $parameters[1])->count();
|
||||
return $count < 1;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Yo dawg. I heard you like validators.
|
||||
// This validates the custom validator regex in custom fields.
|
||||
// We're just checking that the regex won't throw an exception, not
|
||||
// that it's actually correct for what the user intended.
|
||||
|
||||
Validator::extend('valid_regex', function ($attribute, $value, $parameters, $validator) {
|
||||
|
||||
// Make sure it's not just an ANY format
|
||||
if ($value!='') {
|
||||
|
||||
// Check that the string starts with regex:
|
||||
if (strpos($value, 'regex:') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$test_string = 'My hovercraft is full of eels';
|
||||
|
||||
// We have to stip out the regex: part here to check with preg_match
|
||||
$test_pattern = str_replace('regex:','', $value);
|
||||
|
||||
try {
|
||||
preg_match($test_pattern, $test_string);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -4,9 +4,8 @@
|
|||
"keywords": ["assets", "asset-management", "laravel"],
|
||||
"license": "AGPL-3",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"require": {
|
||||
"php": ">=5.6.4",
|
||||
"aws/aws-sdk-php-laravel": "^3.1",
|
||||
"barryvdh/laravel-debugbar": "^2.4",
|
||||
"doctrine/cache": "^1.6",
|
||||
"doctrine/common": "^2.7",
|
||||
|
@ -17,7 +16,6 @@
|
|||
"fideloper/proxy": "^3.1",
|
||||
"intervention/image": "^2.3",
|
||||
"javiereguiluz/easyslugger": "^1.0",
|
||||
"jenssegers/rollbar": "^1.5",
|
||||
"laravel/framework": "5.4.29",
|
||||
"laravel/passport": "^3.0",
|
||||
"laravel/tinker": "^1.0",
|
||||
|
@ -30,6 +28,7 @@
|
|||
"phpspec/prophecy": "1.6.2",
|
||||
"pragmarx/google2fa": "^1.0",
|
||||
"predis/predis": "^1.1",
|
||||
"rollbar/rollbar-laravel": "^2.2",
|
||||
"schuppo/password-strength": "~1.5",
|
||||
"spatie/laravel-backup": "^3.0.0",
|
||||
"tecnickcom/tc-lib-barcode": "^1.15",
|
||||
|
|
376
composer.lock
generated
376
composer.lock
generated
|
@ -4,144 +4,8 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a1fc66ea043e149e85b4d708f852adbe",
|
||||
"content-hash": "53bd9d88d11d74732ab302b7ebd01af3",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.36.32",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "7ba49dbd24366647a41cd4a13eab972b2264b8db"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7ba49dbd24366647a41cd4a13eab972b2264b8db",
|
||||
"reference": "7ba49dbd24366647a41cd4a13eab972b2264b8db",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-spl": "*",
|
||||
"guzzlehttp/guzzle": "^5.3.1|^6.2.1",
|
||||
"guzzlehttp/promises": "~1.0",
|
||||
"guzzlehttp/psr7": "^1.4.1",
|
||||
"mtdowling/jmespath.php": "~2.2",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"andrewsville/php-token-reflection": "^1.4",
|
||||
"aws/aws-php-sns-message-validator": "~1.0",
|
||||
"behat/behat": "~3.0",
|
||||
"doctrine/cache": "~1.4",
|
||||
"ext-dom": "*",
|
||||
"ext-openssl": "*",
|
||||
"nette/neon": "^2.3",
|
||||
"phpunit/phpunit": "^4.8.35|^5.4.0",
|
||||
"psr/cache": "^1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
|
||||
"doctrine/cache": "To use the DoctrineCacheAdapter",
|
||||
"ext-curl": "To send requests using cURL",
|
||||
"ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aws\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Amazon Web Services",
|
||||
"homepage": "http://aws.amazon.com"
|
||||
}
|
||||
],
|
||||
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
|
||||
"homepage": "http://aws.amazon.com/sdkforphp",
|
||||
"keywords": [
|
||||
"amazon",
|
||||
"aws",
|
||||
"cloud",
|
||||
"dynamodb",
|
||||
"ec2",
|
||||
"glacier",
|
||||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2017-10-23T20:40:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php-laravel",
|
||||
"version": "3.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php-laravel.git",
|
||||
"reference": "3b946892d493b91b4920ec4facc4a0ad7195fb86"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php-laravel/zipball/3b946892d493b91b4920ec4facc4a0ad7195fb86",
|
||||
"reference": "3b946892d493b91b4920ec4facc4a0ad7195fb86",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"aws/aws-sdk-php": "~3.0",
|
||||
"illuminate/support": "~5.1",
|
||||
"php": ">=5.5.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0|~5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"laravel/framework": "To test the Laravel bindings",
|
||||
"laravel/lumen-framework": "To test the Lumen bindings"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aws\\Laravel\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Amazon Web Services",
|
||||
"homepage": "http://aws.amazon.com"
|
||||
}
|
||||
],
|
||||
"description": "A simple Laravel 5 service provider for including the AWS SDK for PHP.",
|
||||
"homepage": "http://aws.amazon.com/sdkforphp2",
|
||||
"keywords": [
|
||||
"amazon",
|
||||
"aws",
|
||||
"dynamodb",
|
||||
"ec2",
|
||||
"laravel",
|
||||
"laravel 5",
|
||||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2016-01-18T06:57:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v2.4.3",
|
||||
|
@ -1375,58 +1239,6 @@
|
|||
"description": "A fast and easy to use slugger with full UTF-8 support.",
|
||||
"time": "2015-04-12T19:57:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jenssegers/rollbar",
|
||||
"version": "v1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jenssegers/laravel-rollbar.git",
|
||||
"reference": "d61d6797884df95f6928dee1e23d886ac7086265"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jenssegers/laravel-rollbar/zipball/d61d6797884df95f6928dee1e23d886ac7086265",
|
||||
"reference": "d61d6797884df95f6928dee1e23d886ac7086265",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^4.0|^5.0",
|
||||
"php": ">=5.4",
|
||||
"rollbar/rollbar": "~0.15"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9",
|
||||
"orchestra/testbench": "^3.0",
|
||||
"phpunit/phpunit": "~4.0|~5.0",
|
||||
"satooshi/php-coveralls": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Jenssegers\\Rollbar\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jens Segers",
|
||||
"homepage": "https://jenssegers.com"
|
||||
}
|
||||
],
|
||||
"description": "Rollbar error monitoring integration for Laravel projects",
|
||||
"homepage": "https://github.com/jenssegers/laravel-rollbar",
|
||||
"keywords": [
|
||||
"error",
|
||||
"laravel",
|
||||
"logging",
|
||||
"monitoring",
|
||||
"rollbar"
|
||||
],
|
||||
"time": "2017-01-25T08:34:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.4.29",
|
||||
|
@ -2248,7 +2060,7 @@
|
|||
},
|
||||
{
|
||||
"name": "mtdowling/cron-expression",
|
||||
"version": "v1.2.0",
|
||||
"version": "v1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mtdowling/cron-expression.git",
|
||||
|
@ -2290,61 +2102,6 @@
|
|||
],
|
||||
"time": "2017-01-23T04:29:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/jmespath.php",
|
||||
"version": "2.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jmespath/jmespath.php.git",
|
||||
"reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac",
|
||||
"reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/jp.php"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JmesPath\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/JmesPath.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Declaratively specify how to extract elements from a JSON document",
|
||||
"keywords": [
|
||||
"json",
|
||||
"jsonpath"
|
||||
],
|
||||
"time": "2016-12-03T22:08:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "neitanod/forceutf8",
|
||||
"version": "v2.0.1",
|
||||
|
@ -2434,16 +2191,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v3.1.1",
|
||||
"version": "v3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a"
|
||||
"reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a1e8e1a30e1352f118feff1a8481066ddc2f234a",
|
||||
"reference": "a1e8e1a30e1352f118feff1a8481066ddc2f234a",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/08131e7ff29de6bb9f12275c7d35df71f25f4d89",
|
||||
"reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2481,7 +2238,7 @@
|
|||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2017-09-02T17:10:46+00:00"
|
||||
"time": "2017-11-04T11:48:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
|
@ -3101,16 +2858,16 @@
|
|||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
"version": "v0.8.13",
|
||||
"version": "v0.8.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bobthecow/psysh.git",
|
||||
"reference": "cdb5593c3684bab74e10fcfffe4a0c8d1c39695d"
|
||||
"reference": "91e53c16560bdb8b9592544bb38429ae00d6baee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/cdb5593c3684bab74e10fcfffe4a0c8d1c39695d",
|
||||
"reference": "cdb5593c3684bab74e10fcfffe4a0c8d1c39695d",
|
||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/91e53c16560bdb8b9592544bb38429ae00d6baee",
|
||||
"reference": "91e53c16560bdb8b9592544bb38429ae00d6baee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3170,7 +2927,7 @@
|
|||
"interactive",
|
||||
"shell"
|
||||
],
|
||||
"time": "2017-10-19T06:13:20+00:00"
|
||||
"time": "2017-11-04T16:06:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
|
@ -3256,31 +3013,40 @@
|
|||
},
|
||||
{
|
||||
"name": "rollbar/rollbar",
|
||||
"version": "v0.18.2",
|
||||
"version": "v1.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rollbar/rollbar-php.git",
|
||||
"reference": "fafe13f8beb669d6bba0137f3703fa808d50cbb7"
|
||||
"reference": "2e092656f49b5bd52eb5ee381b5eece58d82e30e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/fafe13f8beb669d6bba0137f3703fa808d50cbb7",
|
||||
"reference": "fafe13f8beb669d6bba0137f3703fa808d50cbb7",
|
||||
"url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/2e092656f49b5bd52eb5ee381b5eece58d82e30e",
|
||||
"reference": "2e092656f49b5bd52eb5ee381b5eece58d82e30e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*"
|
||||
"ext-curl": "*",
|
||||
"psr/log": "~1.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeclimate/php-test-reporter": "dev-master",
|
||||
"mockery/mockery": "0.9.*",
|
||||
"phpunit/phpunit": "4.5.*"
|
||||
"monolog/monolog": "*",
|
||||
"packfire/php5.3-compat": "*",
|
||||
"phpmd/phpmd": "@stable",
|
||||
"phpunit/phpunit": "4.8.*",
|
||||
"squizlabs/php_codesniffer": "2.*"
|
||||
},
|
||||
"suggest": {
|
||||
"fluent/logger": "Needed to use the 'fluent' handler for fluentd support",
|
||||
"packfire/php5.3-compat": "for backward compatibility with PHP 5.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/Level.php",
|
||||
"src/rollbar.php"
|
||||
]
|
||||
"psr-4": {
|
||||
"Rollbar\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
|
@ -3302,7 +3068,75 @@
|
|||
"logging",
|
||||
"monitoring"
|
||||
],
|
||||
"time": "2016-07-05T15:50:29+00:00"
|
||||
"time": "2017-10-27T17:40:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "rollbar/rollbar-laravel",
|
||||
"version": "v2.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rollbar/rollbar-php-laravel.git",
|
||||
"reference": "8d46138367cc2a45aa9e1097258847cfc6eddbe2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rollbar/rollbar-php-laravel/zipball/8d46138367cc2a45aa9e1097258847cfc6eddbe2",
|
||||
"reference": "8d46138367cc2a45aa9e1097258847cfc6eddbe2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "^4.0|^5.0",
|
||||
"php": ">=5.4",
|
||||
"rollbar/rollbar": "^1.3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9",
|
||||
"orchestra/testbench": "~3.0",
|
||||
"phpunit/phpunit": "~4.0|~5.0",
|
||||
"satooshi/php-coveralls": "^1.0",
|
||||
"squizlabs/php_codesniffer": "2.*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Rollbar\\Laravel\\RollbarServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Rollbar": "Rollbar\\Laravel\\Facades\\Rollbar"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Rollbar\\Laravel\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jens Segers",
|
||||
"homepage": "https://jenssegers.com"
|
||||
},
|
||||
{
|
||||
"name": "Artur Moczulski",
|
||||
"email": "artur.moczulski@gmail.com",
|
||||
"role": "Contractor @ Rollbar, Inc."
|
||||
}
|
||||
],
|
||||
"description": "Rollbar error monitoring integration for Laravel projects",
|
||||
"homepage": "https://github.com/rollbar/rollbar-php-laravel",
|
||||
"keywords": [
|
||||
"error",
|
||||
"laravel",
|
||||
"logging",
|
||||
"monitoring",
|
||||
"rollbar"
|
||||
],
|
||||
"time": "2017-09-19T00:20:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "schuppo/password-strength",
|
||||
|
@ -5036,16 +4870,16 @@
|
|||
},
|
||||
{
|
||||
"name": "watson/validating",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dwightwatson/validating.git",
|
||||
"reference": "ade13078bf2e820e244603446114a28eda51b08c"
|
||||
"reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dwightwatson/validating/zipball/ade13078bf2e820e244603446114a28eda51b08c",
|
||||
"reference": "ade13078bf2e820e244603446114a28eda51b08c",
|
||||
"url": "https://api.github.com/repos/dwightwatson/validating/zipball/22edd06d45893f5d4f79c9e901bd7fbce174a79f",
|
||||
"reference": "22edd06d45893f5d4f79c9e901bd7fbce174a79f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5082,7 +4916,7 @@
|
|||
"laravel",
|
||||
"validation"
|
||||
],
|
||||
"time": "2017-10-08T22:42:01+00:00"
|
||||
"time": "2017-11-06T21:35:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
|
|
|
@ -278,7 +278,6 @@ return [
|
|||
*/
|
||||
|
||||
Barryvdh\Debugbar\ServiceProvider::class,
|
||||
Aws\Laravel\AwsServiceProvider::class,
|
||||
Intervention\Image\ImageServiceProvider::class,
|
||||
Collective\Html\HtmlServiceProvider::class,
|
||||
Spatie\Backup\BackupServiceProvider::class,
|
||||
|
@ -297,6 +296,8 @@ return [
|
|||
App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\SettingsServiceProvider::class,
|
||||
App\Providers\ValidationServiceProvider::class,
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Aws\Laravel\AwsServiceProvider;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| AWS SDK Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The configuration options set in this file will be passed directly to the
|
||||
| `Aws\Sdk` object, from which all client objects are created. The minimum
|
||||
| required options are declared here, but the full set of possible options
|
||||
| are documented at:
|
||||
| http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html
|
||||
|
|
||||
*/
|
||||
|
||||
'region' => env('AWS_REGION', 'us-east-1'),
|
||||
'version' => 'latest',
|
||||
'ua_append' => [
|
||||
'L5MOD/' . AwsServiceProvider::VERSION,
|
||||
],
|
||||
];
|
|
@ -26,7 +26,6 @@
|
|||
"bootstrap-datepicker": "^1.6.4",
|
||||
"bootstrap-less": "^3.3.8",
|
||||
"ekko-lightbox": "^5.1.1",
|
||||
"fastclick": "^1.0.6",
|
||||
"font-awesome": "^4.7.0",
|
||||
"jquery-slimscroll": "^1.3.8",
|
||||
"jquery-ui": "^1.12.1",
|
||||
|
|
Binary file not shown.
BIN
public/js/dist/all.js
vendored
BIN
public/js/dist/all.js
vendored
Binary file not shown.
|
@ -8,7 +8,7 @@
|
|||
"/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=7c3842d2639193ac7e88",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=45f8944e6ec45cec9861",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=16d568df949bf39d8ff6",
|
||||
"/css/build/all.css": "/css/build/all.css?id=7c3842d2639193ac7e88",
|
||||
"/js/build/all.js": "/js/build/all.js?id=45f8944e6ec45cec9861"
|
||||
"/js/build/all.js": "/js/build/all.js?id=16d568df949bf39d8ff6"
|
||||
}
|
|
@ -63,7 +63,7 @@ $.AdminLTE.options = {
|
|||
//native touch experience with touch devices. If you
|
||||
//choose to enable the plugin, make sure you load the script
|
||||
//before AdminLTE's app.js
|
||||
enableFastclick: true,
|
||||
enableFastclick: false,
|
||||
//Control Sidebar Options
|
||||
enableControlSidebar: true,
|
||||
controlSidebarOptions: {
|
||||
|
|
|
@ -40,7 +40,7 @@ mix
|
|||
'./node_modules/jquery-slimscroll/jquery.slimscroll.js',
|
||||
'./node_modules/jquery.iframe-transport/jquery.iframe-transport.js',
|
||||
'./node_modules/blueimp-file-upload/js/jquery.fileupload.js',
|
||||
'./node_modules/fastclick/lib/fastclick.js',
|
||||
// './node_modules/fastclick/lib/fastclick.js',
|
||||
'./node_modules/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js',
|
||||
'./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
|
||||
'./bower_components/iCheck/icheck.js',
|
||||
|
|
Loading…
Reference in a new issue