Add Larastan configuration and dependencies for static analysis #9

Merged
jothi merged 8 commits from ranjith-dev into master 2025-11-26 09:11:37 +00:00
Showing only changes of commit d7b6e8c111 - Show all commits

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Plant; use App\Models\Plant;
use App\Models\User; use App\Models\User;
//use Carbon\Carbon;
use Hash; use Hash;
use Illuminate\Http\Request; use Illuminate\Http\Request;
@@ -83,10 +84,11 @@ class UserController extends Controller
//$user = User::where('email', $email)->first(); //$user = User::where('email', $email)->first();
if (Hash::check($header_pass, $existUser->password)) { if (Hash::check($header_pass, $existUser->password)) {
return response()->json([ return response()->json([
'created_at' => $existUser->created_at->format('Y-m-d H:i:s'), 'created_at' => $existUser->created_at->format('Y-m-d H:i:s') ?? "",
'updated_at' => $existUser->updated_at->format('Y-m-d H:i:s'), 'updated_at' => $existUser->updated_at->format('Y-m-d H:i:s') ?? "",
'plant' => (String)$existPlant, 'requested_at' => now()->format('Y-m-d H:i:s') ?? "", //Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s') ?? "",
'email' => $existUser->email, 'plant' => (String)$existPlant ?? "",
'email' => $existUser->email ?? "",
'roles' => $existUser->roles()->pluck('name')->toArray() 'roles' => $existUser->roles()->pluck('name')->toArray()
], 200); ], 200);
} else { } else {