7d854ffb0a
- Translation system: lang/es/ PHP files (auth, validation, pagination, passwords)
- Rappasoft vendor translations published (lang/vendor/livewire-tables/es/)
- JSON files synced to 391 keys (EN + ES, full parity)
- APP_LOCALE changed to 'es', users.locale column default changed to 'es'
- Language switcher fixed: JS event + window.location.reload() avoids /livewire/update redirect
- SetLocale middleware fallback uses config('app.locale') instead of hardcoded 'en'
- setSortingPillsEnabled(false) on ProjectTable, CompanyTable, UserTable
- Translated 17 blade views: project-map, template-manager, layer-manager,
company-management, phase-list, media-manager, reports-dashboard,
client-projects, layer-upload, project-form, project-map-editor-tab,
admin/users, projects/media, projects/templates, layouts/client
- Navigation 'Empresas' link uses __('Companies')
- Fixed typo key 'Fases and layers' -> 'Phases and layers'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
782 B
PHP
42 lines
782 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Company extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'apodo',
|
|
'estado',
|
|
'logo_path',
|
|
'name',
|
|
'tax_id',
|
|
'address',
|
|
'phone',
|
|
'email',
|
|
'website',
|
|
'type',
|
|
'notes',
|
|
];
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
// Relationships
|
|
public function users()
|
|
{
|
|
return $this->hasMany(User::class);
|
|
}
|
|
|
|
public function projects()
|
|
{
|
|
return $this->belongsToMany(Project::class, 'company_project')
|
|
->withPivot('role_in_project')
|
|
->withTimestamps();
|
|
}
|
|
}
|