@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | // Search for a customer |
35 | 35 | public function search(Request $request) |
36 | 36 | { |
37 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
37 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
38 | 38 | |
39 | 39 | $request->validate([ |
40 | 40 | 'sortField' => 'required', |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | // Search the name, dba name, and cust id columns |
50 | 50 | ->where(function($query) use ($request) |
51 | 51 | { |
52 | - $query->where('name', 'like', '%' . $request->name . '%') |
|
53 | - ->orWhere('cust_id', 'like', '%' . $request->name . '%') |
|
54 | - ->orWhere('dba_name', 'like', '%' . $request->name . '%'); |
|
52 | + $query->where('name', 'like', '%'.$request->name.'%') |
|
53 | + ->orWhere('cust_id', 'like', '%'.$request->name.'%') |
|
54 | + ->orWhere('dba_name', 'like', '%'.$request->name.'%'); |
|
55 | 55 | }) |
56 | 56 | // Search the city column |
57 | - ->where('city', 'like', '%' . $request->city . '%') |
|
57 | + ->where('city', 'like', '%'.$request->city.'%') |
|
58 | 58 | // Include the customers systems |
59 | 59 | ->with('CustomerSystems.SystemTypes') |
60 | 60 | // If the system field is present - search for system type |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // Check to see if a customer ID already exists |
80 | 80 | public function checkID($id) |
81 | 81 | { |
82 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name); |
|
82 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name); |
|
83 | 83 | $cust = Customers::find($id); |
84 | 84 | |
85 | 85 | if($cust === null) |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // Store a new customer contact |
24 | 24 | public function store(Request $request) |
25 | 25 | { |
26 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
26 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
27 | 27 | |
28 | 28 | $request->validate([ |
29 | 29 | 'cust_id' => 'required', |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | // Determine if there is a parent site with shared contacts |
72 | 72 | $parent = Customers::find($id)->parent_id; |
73 | - if ($parent) |
|
73 | + if($parent) |
|
74 | 74 | { |
75 | 75 | $parentList = CustomerContacts::where('cust_id', $parent) |
76 | 76 | ->where('shared', 1) |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | // Update an existing Customer Contact |
122 | 122 | public function update(Request $request, $id) |
123 | 123 | { |
124 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by ' . Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
124 | + Log::debug('Route '.Route::currentRouteName().' visited by '.Auth::user()->full_name.'. Submitted Data - ', $request->toArray()); |
|
125 | 125 | |
126 | 126 | $request->validate([ |
127 | 127 | 'cust_id' => 'required', |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | // Update the primary contact information |
132 | 132 | $details = Customers::find($request->cust_id); |
133 | - if ($details->parent_id && $request->shared == 'true') { |
|
133 | + if($details->parent_id && $request->shared == 'true') { |
|
134 | 134 | $request->cust_id = $details->parent_id; |
135 | 135 | } |
136 | 136 |
@@ -25,26 +25,26 @@ |
||
25 | 25 | // Validate the hash token |
26 | 26 | $user = UserInitialize::where('token', $hash)->get(); |
27 | 27 | |
28 | - if ($user->isEmpty()) { |
|
29 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
|
28 | + if($user->isEmpty()) { |
|
29 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to access invalid initialize hash - '.$hash); |
|
30 | 30 | return abort(404); |
31 | 31 | } |
32 | 32 | |
33 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address .'.\Request::ip()); |
|
34 | - Log::debug('Link Hash -' . $hash); |
|
33 | + Log::debug('Route '.Route::currentRouteName().' visited by IP Address .'.\Request::ip()); |
|
34 | + Log::debug('Link Hash -'.$hash); |
|
35 | 35 | return view('account.initializeUser', ['hash' => $hash]); |
36 | 36 | } |
37 | 37 | |
38 | 38 | // Submit the initialize user form |
39 | 39 | public function submitInitializeUser(Request $request, $hash) |
40 | 40 | { |
41 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by IP Address -' . \Request::ip().'. Submitted Data - ', $request->toArray()); |
|
41 | + Log::debug('Route '.Route::currentRouteName().' visited by IP Address -'.\Request::ip().'. Submitted Data - ', $request->toArray()); |
|
42 | 42 | Log::debug('Initialize Data - ', $request->toArray()); |
43 | 43 | |
44 | 44 | // Verify that the link matches the assigned email address |
45 | 45 | $valid = UserInitialize::where('token', $hash)->first(); |
46 | - if (empty($valid)) { |
|
47 | - Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
|
46 | + if(empty($valid)) { |
|
47 | + Log::warning('Visitor at IP Address '.\Request::ip().' tried to submit an invalid User Initialization link - '.$hash); |
|
48 | 48 | return abort(404); |
49 | 49 | } |
50 | 50 |
@@ -25,7 +25,8 @@ discard block |
||
25 | 25 | // Validate the hash token |
26 | 26 | $user = UserInitialize::where('token', $hash)->get(); |
27 | 27 | |
28 | - if ($user->isEmpty()) { |
|
28 | + if ($user->isEmpty()) |
|
29 | + { |
|
29 | 30 | Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to access invalid initialize hash - ' . $hash); |
30 | 31 | return abort(404); |
31 | 32 | } |
@@ -43,7 +44,8 @@ discard block |
||
43 | 44 | |
44 | 45 | // Verify that the link matches the assigned email address |
45 | 46 | $valid = UserInitialize::where('token', $hash)->first(); |
46 | - if (empty($valid)) { |
|
47 | + if (empty($valid)) |
|
48 | + { |
|
47 | 49 | Log::warning('Visitor at IP Address ' . \Request::ip() . ' tried to submit an invalid User Initialization link - ' . $hash); |
48 | 50 | return abort(404); |
49 | 51 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up() |
16 | 16 | { |
17 | - Schema::create('user_role_permission_types', function (Blueprint $table) { |
|
17 | + Schema::create('user_role_permission_types', function(Blueprint $table) { |
|
18 | 18 | $table->increments('perm_type_id'); |
19 | 19 | $table->text('description'); |
20 | 20 | $table->timestamps(); |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | |
23 | 23 | // Insert default roles permission types |
24 | 24 | DB::table('user_role_permission_types')->insert([ |
25 | - ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
26 | - ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
27 | - ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
28 | - ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | - ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | - ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | - ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | - ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | - ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
34 | - ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
35 | - ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
25 | + ['perm_type_id' => 1, 'description' => 'Manage Users', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
26 | + ['perm_type_id' => 2, 'description' => 'Manage User Roles', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
27 | + ['perm_type_id' => 3, 'description' => 'Run Reports', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
28 | + ['perm_type_id' => 4, 'description' => 'Add Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
29 | + ['perm_type_id' => 5, 'description' => 'Manage Customers', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
30 | + ['perm_type_id' => 6, 'description' => 'Deactivate Customer', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
31 | + ['perm_type_id' => 7, 'description' => 'Use File Links', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
32 | + ['perm_type_id' => 8, 'description' => 'Create Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
33 | + ['perm_type_id' => 9, 'description' => 'Edit Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
34 | + ['perm_type_id' => 10, 'description' => 'Delete Tech Tip', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
35 | + ['perm_type_id' => 11, 'description' => 'Manage Equipment', 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()], |
|
36 | 36 | ]); |
37 | 37 | } |
38 | 38 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use App\UserRolePermissions; |
6 | 6 | |
7 | -$factory->define(UserRolePermissions::class, function () { |
|
7 | +$factory->define(UserRolePermissions::class, function() { |
|
8 | 8 | return [ |
9 | 9 | 'role_id' => factory(App\UserRoleType::class)->create()->role_id, |
10 | 10 | 'perm_type_id' => factory(App\UserRolePermissionTypes::class)->create()->perm_type_id, |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use App\UserRoleType; |
6 | 6 | use Faker\Generator as Faker; |
7 | 7 | |
8 | -$factory->define(UserRoleType::class, function (Faker $faker) { |
|
8 | +$factory->define(UserRoleType::class, function(Faker $faker) { |
|
9 | 9 | return [ |
10 | 10 | 'name' => $faker->words(2, true), |
11 | 11 | 'description' => $faker->words(3, true), |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Faker\Generator as Faker; |
6 | 6 | use App\UserRolePermissionTypes; |
7 | 7 | |
8 | -$factory->define(UserRolePermissionTypes::class, function (Faker $faker) { |
|
8 | +$factory->define(UserRolePermissionTypes::class, function(Faker $faker) { |
|
9 | 9 | return [ |
10 | 10 | 'description' => $faker->words(2, true), |
11 | 11 | ]; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Faker\Generator as Faker; |
6 | 6 | |
7 | -$factory->define(Illuminate\Notifications\DatabaseNotification::class, function (Faker $faker) { |
|
7 | +$factory->define(Illuminate\Notifications\DatabaseNotification::class, function(Faker $faker) { |
|
8 | 8 | return [ |
9 | 9 | 'id' => $faker->uuid, |
10 | 10 | ]; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ |
4 | 4 | |
5 | -$factory->define(App\UserInitialize::class, function () { |
|
5 | +$factory->define(App\UserInitialize::class, function() { |
|
6 | 6 | return [ |
7 | 7 | 'username' => factory(App\User::class)->create()->username, |
8 | 8 | 'token' => strtolower(Str::random(30)), |