1 | <?php |
||
8 | class StrAccentsMacroServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | const CHARACTERS = [ |
||
11 | 'à' => 'a', 'â' => 'a', 'ä' => 'a', |
||
12 | 'ç' => 'c', |
||
13 | 'é' => 'e', 'è' => 'e', 'ê' => 'e', 'ë' => 'e', |
||
14 | 'î' => 'i', 'ï' => 'i', |
||
15 | 'ô' => 'o', 'ö' => 'o', |
||
16 | 'À' => 'A', 'Â' => 'A', 'Ä' => 'A', |
||
17 | 'Ç' => 'C', |
||
18 | 'É' => 'E', 'È' => 'E', 'Ê' => 'E', 'Ë' => 'E', |
||
19 | 'Î' => 'I', 'Ï' => 'I', |
||
20 | 'Ô' => 'O', 'Ö' => 'O', |
||
21 | ]; |
||
22 | |||
23 | /** |
||
24 | * Bootstrap the application services. |
||
25 | */ |
||
26 | public function boot() |
||
30 | |||
31 | /** |
||
32 | * Remove the accented characters from a string. |
||
33 | * |
||
34 | * @param string $value |
||
35 | * @return string |
||
36 | */ |
||
37 | public function removeAccents(string $value) : string |
||
45 | } |
||
46 |