2025-08-25 17:26:20 +09:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Success / Info / General messages (non-error)
|
|
|
|
|
* - For API normal response "message" field
|
|
|
|
|
* - Use common keys and resource-specific nested keys
|
|
|
|
|
* - Example: return ApiResponse::success($data, __('message.created'));
|
|
|
|
|
*/
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
|
|
// Common (CRUD / convenience)
|
|
|
|
|
'fetched' => 'Fetched successfully.',
|
|
|
|
|
'created' => 'Created successfully.',
|
|
|
|
|
'updated' => 'Updated successfully.',
|
|
|
|
|
'deleted' => 'Deleted successfully.',
|
|
|
|
|
'restored' => 'Restored successfully.',
|
|
|
|
|
'toggled' => 'Status updated successfully.',
|
|
|
|
|
'bulk_upsert' => 'Bulk save completed successfully.',
|
|
|
|
|
'reordered' => 'Reorder completed successfully.',
|
|
|
|
|
'no_changes' => 'No changes detected.',
|
|
|
|
|
|
|
|
|
|
// Auth / Session
|
|
|
|
|
'login_success' => 'Login successful.',
|
|
|
|
|
'logout_success' => 'You have been logged out.',
|
|
|
|
|
'signup_success' => 'Sign-up completed successfully.',
|
|
|
|
|
|
|
|
|
|
// Tenant / Context
|
|
|
|
|
'tenant_switched' => 'Active tenant has been switched.',
|
|
|
|
|
|
|
|
|
|
// Resource-specific details
|
|
|
|
|
'product' => [
|
|
|
|
|
'created' => 'Product has been created.',
|
|
|
|
|
'updated' => 'Product has been updated.',
|
|
|
|
|
'deleted' => 'Product has been deleted.',
|
|
|
|
|
'toggled' => 'Product status has been updated.',
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'bom' => [
|
|
|
|
|
'fetched' => 'BOM items have been fetched.',
|
|
|
|
|
'bulk_upsert' => 'BOM items have been saved.',
|
|
|
|
|
'reordered' => 'BOM order has been updated.',
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'category' => [
|
|
|
|
|
'fields_saved' => 'Category fields have been saved.',
|
|
|
|
|
'template_saved' => 'Category template has been saved.',
|
|
|
|
|
'template_applied' => 'Category template has been applied.',
|
|
|
|
|
],
|
2025-09-11 13:34:20 +09:00
|
|
|
|
|
|
|
|
'design' => [
|
|
|
|
|
'template_cloned' => 'BOM template has been cloned.',
|
|
|
|
|
'template_diff' => 'BOM template differences have been computed.',
|
|
|
|
|
],
|
2025-08-25 17:26:20 +09:00
|
|
|
];
|