@@ -211,7 +211,8 @@ |
||
211 | 211 | public function destroy($id) |
212 | 212 | { |
213 | 213 | // |
214 | - try { |
|
214 | + try |
|
215 | + { |
|
215 | 216 | SystemTypes::find($id)->delete(); |
216 | 217 | return response()->json(['success' => true, 'reason' => 'Equipment Successfully Deleted']); |
217 | 218 | } |
@@ -59,9 +59,12 @@ discard block |
||
59 | 59 | public function archiveFiles(Request $request) |
60 | 60 | { |
61 | 61 | // Debug Data |
62 | - if(Auth::user()) { |
|
62 | + if(Auth::user()) |
|
63 | + { |
|
63 | 64 | $user = Auth::user()->full_name; |
64 | - } else { |
|
65 | + } |
|
66 | + else |
|
67 | + { |
|
65 | 68 | $user = \Request::ip(); |
66 | 69 | } |
67 | 70 | Log::debug('Route '.Route::currentRouteName().' visited by '.$user.' Request Data:', $request->toArray()); |
@@ -107,9 +110,12 @@ discard block |
||
107 | 110 | public function downloadArchive($fileName) |
108 | 111 | { |
109 | 112 | // Debug Data |
110 | - if(Auth::user()) { |
|
113 | + if(Auth::user()) |
|
114 | + { |
|
111 | 115 | $user = Auth::user()->full_name; |
112 | - } else { |
|
116 | + } |
|
117 | + else |
|
118 | + { |
|
113 | 119 | $user = \Request::ip(); |
114 | 120 | } |
115 | 121 | Log::debug('Route '.Route::currentRouteName().' visited by '.$user); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | Log::notice('User '.Auth::user()->full_name.' updated User Password Policy'); |
90 | 90 | |
91 | 91 | // If the setting is changing from never to xx days, update all users |
92 | - if ($request->passExpire == 0) |
|
92 | + if($request->passExpire == 0) |
|
93 | 93 | { |
94 | 94 | User::whereNotNull('password_expires')->update([ |
95 | 95 | 'password_expires' => null |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | public function roleSettings() |
111 | 111 | { |
112 | 112 | $this->authorize('hasAccess', 'Manage User Roles'); |
113 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
113 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
114 | 114 | $roles = UserRoleType::with(['UserRolePermissions' => function($query) { |
115 | 115 | $query->join('user_role_permission_types', 'user_role_permission_types.perm_type_id', '=', 'user_role_permissions.perm_type_id'); |
116 | 116 | }])->get(); |
@@ -182,13 +182,13 @@ discard block |
||
182 | 182 | |
183 | 183 | // Good to go - get role information |
184 | 184 | $roleArr = []; |
185 | - foreach ($roles as $role) |
|
185 | + foreach($roles as $role) |
|
186 | 186 | { |
187 | - if ($role->role_id == 1 && Auth::user()->role_id != 1) |
|
187 | + if($role->role_id == 1 && Auth::user()->role_id != 1) |
|
188 | 188 | { |
189 | 189 | continue; |
190 | 190 | } |
191 | - else if ($role->role_id == 2 && Auth::user()->role_id > 1) |
|
191 | + else if($role->role_id == 2 && Auth::user()->role_id > 1) |
|
192 | 192 | { |
193 | 193 | continue; |
194 | 194 | } |
@@ -285,13 +285,13 @@ discard block |
||
285 | 285 | $user = User::find($request->user_id); |
286 | 286 | |
287 | 287 | // Verify this is a valid user ID |
288 | - if (!$user) |
|
288 | + if(!$user) |
|
289 | 289 | { |
290 | 290 | $success = false; |
291 | 291 | $reason = 'Cannot find user with this ID'; |
292 | 292 | } |
293 | 293 | // Make sure that the user is not trying to deactivate someone with more permissions |
294 | - else if ($user->role_id < Auth::user()->role_id) |
|
294 | + else if($user->role_id < Auth::user()->role_id) |
|
295 | 295 | { |
296 | 296 | $success = false; |
297 | 297 | $reason = 'You cannot change password for a user with higher permissions that you. If this user has locked themselves out, have then use the reset link on the login page.'; |
@@ -8,148 +8,148 @@ |
||
8 | 8 | /* |
9 | 9 | * Non user Routes |
10 | 10 | */ |
11 | -Route::get('/', 'Auth\LoginController@showLoginForm') ->name('index'); |
|
12 | -Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
13 | -Route::get('no-script', 'Controller@noScript') ->name('noscript'); |
|
14 | -Route::get('finish-setup/{hash}', 'Auth\InitializeUserController@initializeUser') ->name('initialize'); |
|
11 | +Route::get('/', 'Auth\LoginController@showLoginForm') ->name('index'); |
|
12 | +Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
13 | +Route::get('no-script', 'Controller@noScript') ->name('noscript'); |
|
14 | +Route::get('finish-setup/{hash}', 'Auth\InitializeUserController@initializeUser') ->name('initialize'); |
|
15 | 15 | Route::post('finish-setup/{hash}', 'Auth\InitializeUserController@submitInitializeUser')->name('initialize'); |
16 | 16 | |
17 | 17 | /* |
18 | 18 | * Download File Routes |
19 | 19 | */ |
20 | -Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
20 | +Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
21 | 21 | Route::get('download-archive/{filename}', 'DownloadController@downloadArchive')->name('downloadArchive'); |
22 | -Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
22 | +Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
23 | 23 | |
24 | 24 | /* |
25 | 25 | * User Settings Routes |
26 | 26 | */ |
27 | -Route::get('account', 'AccountController@index') ->name('account'); |
|
28 | -Route::post('account', 'AccountController@submit') ->name('account'); |
|
29 | -Route::put('account', 'AccountController@notifications') ->name('account'); |
|
30 | -Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
27 | +Route::get('account', 'AccountController@index') ->name('account'); |
|
28 | +Route::post('account', 'AccountController@submit') ->name('account'); |
|
29 | +Route::put('account', 'AccountController@notifications') ->name('account'); |
|
30 | +Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
31 | 31 | Route::post('/account/change-password', 'AccountController@submitPassword')->name('changePassword'); |
32 | 32 | |
33 | 33 | /* |
34 | 34 | * Basic Logged In Routes |
35 | 35 | */ |
36 | -Route::get('about', 'DashboardController@about') ->name('about'); |
|
37 | -Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
38 | -Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
36 | +Route::get('about', 'DashboardController@about') ->name('about'); |
|
37 | +Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
38 | +Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
39 | 39 | Route::get('mark-notification/{id}', 'DashboardController@markNotification')->name('markNotification'); |
40 | -Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
40 | +Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
41 | 41 | |
42 | 42 | /* |
43 | 43 | * File Link Routes |
44 | 44 | */ |
45 | -Route::prefix('links')->name('links.')->group(function () { |
|
45 | +Route::prefix('links')->name('links.')->group(function() { |
|
46 | 46 | // Resource controllers for base access |
47 | - Route::resource('data', 'FileLinks\FileLinksController'); |
|
48 | - Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
49 | - Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
47 | + Route::resource('data', 'FileLinks\FileLinksController'); |
|
48 | + Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
49 | + Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
50 | 50 | Route::get('details/{id}/{name}', 'FileLinks\FileLinksController@details') ->name('details'); |
51 | - Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
51 | + Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
52 | 52 | // File Link Files |
53 | - Route::resource('files', 'FileLinks\LinkFilesController'); |
|
53 | + Route::resource('files', 'FileLinks\LinkFilesController'); |
|
54 | 54 | // Index landing page |
55 | - Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
55 | + Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
56 | 56 | }); |
57 | 57 | |
58 | 58 | /* |
59 | 59 | * Guest File Link Routes |
60 | 60 | */ |
61 | 61 | Route::get('file-links/{id}/get-files', 'FileLinks\GuestLinksController@getFiles')->name('file-links.getFiles'); |
62 | -Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
63 | -Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
64 | -Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
65 | -Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
62 | +Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
63 | +Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
64 | +Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
65 | +Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
66 | 66 | |
67 | 67 | /* |
68 | 68 | * Customer Routes |
69 | 69 | */ |
70 | 70 | Route::prefix('customer')->name('customer.')->group(function() { |
71 | 71 | // Customer Files |
72 | - Route::resource('files', 'Customers\CustomerFilesController'); |
|
72 | + Route::resource('files', 'Customers\CustomerFilesController'); |
|
73 | 73 | // Custome Notes |
74 | - Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
75 | - Route::resource('notes', 'Customers\CustomerNotesController'); |
|
74 | + Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
75 | + Route::resource('notes', 'Customers\CustomerNotesController'); |
|
76 | 76 | // Customer Contacts |
77 | - Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
77 | + Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
78 | 78 | // Customer Systems |
79 | - Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
79 | + Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
80 | 80 | // Customer Details |
81 | - Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
82 | - Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
83 | - Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
84 | - Route::resource('id', 'Customers\CustomerDetailsController'); |
|
81 | + Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
82 | + Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
83 | + Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
84 | + Route::resource('id', 'Customers\CustomerDetailsController'); |
|
85 | 85 | // check Id and bookmark customer |
86 | 86 | Route::get('toggle-fav/{action}/{custID}', 'Customers\CustomerController@toggleFav') ->name('toggle-fav'); |
87 | - Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
87 | + Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
88 | 88 | // Index landing/search page |
89 | - Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
90 | - Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
89 | + Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
90 | + Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
91 | 91 | }); |
92 | 92 | |
93 | 93 | /* |
94 | 94 | * Tech Tip Routes |
95 | 95 | */ |
96 | -Route::resource('tips', 'TechTips\TechTipsController'); |
|
97 | -Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
96 | +Route::resource('tips', 'TechTips\TechTipsController'); |
|
97 | +Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
98 | 98 | Route::prefix('tip')->name('tip.')->group(function() { |
99 | - Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
100 | - Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
101 | - Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
102 | - Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
99 | + Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
100 | + Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
101 | + Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
102 | + Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
103 | 103 | Route::get('toggle-fav/{action}/{tipID}', 'TechTips\TechTipsController@toggleFav') ->name('toggle-fav'); |
104 | - Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
104 | + Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
105 | 105 | }); |
106 | 106 | |
107 | 107 | /* |
108 | 108 | * Administration Routes |
109 | 109 | */ |
110 | -Route::prefix('admin')->name('admin.')->group(function () { |
|
110 | +Route::prefix('admin')->name('admin.')->group(function() { |
|
111 | 111 | // Routes for Tech Bench Add-ons |
112 | 112 | Route::prefix('modules')->name('module.')->group(function() { |
113 | 113 | Route::delete('delete-staged/{name}', 'Installer\ModuleController@delStaged') ->name('deleteStaged'); |
114 | - Route::post('upload', 'Installer\ModuleController@upload') ->name('upload'); |
|
115 | - Route::get('activate/{name}', 'Installer\ModuleController@activate') ->name('activate'); |
|
116 | - Route::get('disable/{name}', 'Installer\ModuleController@disable') ->name('disable'); |
|
117 | - Route::get('enable/{name}', 'Installer\ModuleController@enable') ->name('enable'); |
|
118 | - Route::get('get-active', 'Installer\ModuleController@getEnabled')->name('getEnabled'); |
|
119 | - Route::get('get-staged', 'Installer\ModuleController@getStaged') ->name('getStaged'); |
|
120 | - Route::get('/', 'Installer\ModuleController@index') ->name('index'); |
|
114 | + Route::post('upload', 'Installer\ModuleController@upload') ->name('upload'); |
|
115 | + Route::get('activate/{name}', 'Installer\ModuleController@activate') ->name('activate'); |
|
116 | + Route::get('disable/{name}', 'Installer\ModuleController@disable') ->name('disable'); |
|
117 | + Route::get('enable/{name}', 'Installer\ModuleController@enable') ->name('enable'); |
|
118 | + Route::get('get-active', 'Installer\ModuleController@getEnabled')->name('getEnabled'); |
|
119 | + Route::get('get-staged', 'Installer\ModuleController@getStaged') ->name('getStaged'); |
|
120 | + Route::get('/', 'Installer\ModuleController@index') ->name('index'); |
|
121 | 121 | }); |
122 | 122 | // Administrative routes for equipment and equipment categories |
123 | - Route::resource('categories', 'Installer\CategoriesController'); |
|
124 | - Route::resource('systems', 'Installer\SystemsController'); |
|
123 | + Route::resource('categories', 'Installer\CategoriesController'); |
|
124 | + Route::resource('systems', 'Installer\SystemsController'); |
|
125 | 125 | // Administrative routes for users |
126 | - Route::resource('user', 'Admin\UserController'); |
|
127 | - Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
128 | - Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
126 | + Route::resource('user', 'Admin\UserController'); |
|
127 | + Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
128 | + Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
129 | 129 | Route::get('check-user/{name}/{type}', 'Admin\UserController@checkUser') ->name('checkUser'); |
130 | - Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
131 | - Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
132 | - Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
133 | - Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
134 | - Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
135 | - Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
130 | + Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
131 | + Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
132 | + Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
133 | + Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
134 | + Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
135 | + Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
136 | 136 | // Tech Bench Settings Routes |
137 | - Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
138 | - Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
139 | - Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
140 | - Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
141 | - Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
142 | - Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
143 | - Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
137 | + Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
138 | + Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
139 | + Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
140 | + Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
141 | + Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings')->name('emailSettings'); |
|
142 | + Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |
|
143 | + Route::get('email-settings', 'Installer\SettingsController@emailSettings') ->name('emailSettings'); |
|
144 | 144 | // Tech Bench Backup Routes |
145 | - Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
146 | - Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
147 | - Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
148 | - Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
149 | - Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
145 | + Route::get('backups/download/{name}', 'Installer\SettingsController@downloadBackup') ->name('downloadBackup'); |
|
146 | + Route::get('backups/delete/{name}', 'Installer\SettingsController@delBackup') ->name('delBackup'); |
|
147 | + Route::get('backups/run', 'Installer\SettingsController@runBackup') ->name('runBackup'); |
|
148 | + Route::get('backups/get', 'Installer\SettingsController@getBackups') ->name('getBackups'); |
|
149 | + Route::get('backups', 'Installer\SettingsController@backupsIndex') ->name('backups'); |
|
150 | 150 | // Tech Bench Updates Routs |
151 | 151 | |
152 | 152 | Route::get('updates', 'Installer\UpdateController@index')->name('updates'); |
153 | 153 | // Admin index route |
154 | - Route::get('/', 'Admin\AdminController@index') ->name('index'); |
|
154 | + Route::get('/', 'Admin\AdminController@index') ->name('index'); |
|
155 | 155 | }); |
@@ -337,7 +337,8 @@ discard block |
||
337 | 337 | // Add soft deletes to tech tips table to prevent accidental deletes |
338 | 338 | private function addSoftDeleteToTechTips() |
339 | 339 | { |
340 | - if(!Schema::hasColumn('tech_tips', 'deleted_at')) { |
|
340 | + if(!Schema::hasColumn('tech_tips', 'deleted_at')) |
|
341 | + { |
|
341 | 342 | Schema::table('tech_tips', function(Blueprint $table) { |
342 | 343 | $table->softDeletes()->after('description'); |
343 | 344 | }); |
@@ -366,34 +367,31 @@ discard block |
||
366 | 367 | { |
367 | 368 | if(!Schema::hasColumn('customers', 'parent_id')) |
368 | 369 | { |
369 | - Schema::table('customers', function(Blueprint $table) |
|
370 | - { |
|
370 | + Schema::table('customers', function(Blueprint $table) { |
|
371 | 371 | $table->integer('parent_id')->after('cust_id')->nullable()->unsigned(); |
372 | 372 | $table->foreign('parent_id')->references('cust_id')->on('customers')->onUpdate('cascade'); |
373 | 373 | }); |
374 | 374 | } |
375 | 375 | if(!Schema::hasColumn('customer_systems', 'shared')) |
376 | 376 | { |
377 | - Schema::table('customer_systems', function(Blueprint $table) |
|
378 | - { |
|
377 | + Schema::table('customer_systems', function(Blueprint $table) { |
|
379 | 378 | $table->boolean('shared')->default(0)->after('sys_id'); |
380 | 379 | }); |
381 | 380 | } |
382 | 381 | if(!Schema::hasColumn('customer_contacts', 'shared')) |
383 | 382 | { |
384 | - Schema::table('customer_contacts', function(Blueprint $table) |
|
385 | - { |
|
383 | + Schema::table('customer_contacts', function(Blueprint $table) { |
|
386 | 384 | $table->boolean('shared')->default(0)->after('cust_id'); |
387 | 385 | }); |
388 | 386 | } |
389 | 387 | if(!Schema::hasColumn('customer_notes', 'shared')) |
390 | 388 | { |
391 | - Schema::table('customer_notes', function(Blueprint $table) |
|
392 | - { |
|
389 | + Schema::table('customer_notes', function(Blueprint $table) { |
|
393 | 390 | $table->boolean('shared')->default(0)->after('user_id'); |
394 | 391 | }); |
395 | 392 | } |
396 | - if(!Schema::hasColumn('customer_files', 'shared')) { |
|
393 | + if(!Schema::hasColumn('customer_files', 'shared')) |
|
394 | + { |
|
397 | 395 | Schema::table('customer_files', function(Blueprint $table) { |
398 | 396 | $table->boolean('shared')->default(0)->after('user_id'); |
399 | 397 | }); |