📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-02 04:47:09
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
app
/
Helpers
📍 /home/orkouolp/web/testing.orkobd/laravel/app/Helpers
🔄 Refresh
✏️
Editing: GlobalHelper.php
Writable
<?php use App\Models\Company; use App\Models\Candidate; use Illuminate\Support\Facades\Auth; // function test() { return "hello world!"; } /** Check input error */ if(!function_exists('hasError')) { function hasError($errors, string $name) { return $errors->has($name)? 'is-invalid': ''; } } /** Set sidebar active */ if(!function_exists('setSidebarActive')) { function setSidebarActive(array $routes) { foreach($routes as $route) { if(request()->routeIs($route)) return 'active'; } return ''; } } /** Check profile completion */ if(!function_exists('isCompanyProfileComplete')) { function isCompanyProfileComplete() { $requiredFields = [ 'logo', 'banner', 'name', 'bio', 'vision', 'establishment_date', 'phone', 'email', 'industry_type_id', 'organization_type_id', 'team_size_id', 'country' ]; $companyProfile = Company::where('user_id', Auth::user()->id)->first(); foreach($requiredFields as $field) { if(empty($companyProfile->{$field})) return false; } return true; } } /** Check candidate profile completion */ if(!function_exists('isCandidateProfileComplete')) { function isCandidateProfileComplete() { $requiredFields = [ 'experience_id', 'profession_id', 'image', 'full_name', 'birth_date', 'gender', 'bio', 'marital_status', 'country', 'status' ]; $candidateProfile = Candidate::where('user_id', Auth::user()->id)->first(); foreach($requiredFields as $field) { if(empty($candidateProfile->{$field})) return false; } return true; } } /** Format date */ if(!function_exists('formatDate')) { function formatDate(?string $date) { if($date) { return date('d M Y', strtotime($date)); } else return ''; } }
💾 Save Changes
❌ Cancel