2
2
3
3
> This package provides handy utilities for Laravel applications.
4
4
5
- | branch | status |
5
+ | Branch | Status |
6
6
| :------------- | :------------- |
7
- | main | ![ tests] ( https://github.com/internetguru/laravel-common/actions/workflows/phpunit.yml/badge.svg?branch=main ) |
8
- | staging | ![ tests] ( https://github.com/internetguru/laravel-common/actions/workflows/phpunit.yml/badge.svg?branch=staging ) |
9
- | dev | ![ tests] ( https://github.com/internetguru/laravel-common/actions/workflows/phpunit.yml/badge.svg?branch=dev ) |
10
-
7
+ | Main | ![ tests] ( https://github.com/internetguru/laravel-common/actions/workflows/phpunit.yml/badge.svg?branch=main ) |
8
+ | Staging | ![ tests] ( https://github.com/internetguru/laravel-common/actions/workflows/phpunit.yml/badge.svg?branch=staging ) |
9
+ | Dev | ![ tests] ( https://github.com/internetguru/laravel-common/actions/workflows/phpunit.yml/badge.svg?branch=dev ) |
11
10
12
11
## Installation
13
12
@@ -23,7 +22,7 @@ composer require internetguru/laravel-common
23
22
24
23
Configuration and example usage:
25
24
26
- 1 ) Add the following lines to the ` config/app.php ` file:
25
+ 1 . Add the following lines to the ` config/app.php ` file:
27
26
28
27
``` php
29
28
use Illuminate\Support\Facades\Facade;
@@ -33,7 +32,7 @@ Configuration and example usage:
33
32
])->toArray(),
34
33
```
35
34
36
- 2) Use `Helpers` class methods in your application:
35
+ 2. Use `Helpers` class methods in your application:
37
36
38
37
```html
39
38
<meta name =" generator" content =" {{ Helpers::getAppInfo() }}" />
@@ -43,7 +42,7 @@ For all available methods, see the [Helpers](src/Support/Helpers.php) class.
43
42
44
43
## Translation Service Provider
45
44
46
- > Enhanced logging for missing translations and variables.
45
+ > Enhanced logging for missing translations and variables.
47
46
48
47
- **Missing Translation Logging**: Logs warnings when a translation key is missing.
49
48
- **Missing Variables Logging**: Logs warnings when variables required in a translation string are not provided.
@@ -53,11 +52,11 @@ For all available methods, see the [Helpers](src/Support/Helpers.php) class.
53
52
Add the following lines to the `config/app.php` file to use the `TranslationServiceProvider`:
54
53
55
54
```php
56
- use Illuminate\Support\ServiceProvider;
55
+ use Illuminate\Support\ServiceProvider;
57
56
58
- 'providers' => ServiceProvider::defaultProviders()->replace([
59
- Illuminate\Translation\TranslationServiceProvider::class => InternetGuru\LaravelCommon\TranslationServiceProvider::class,
60
- ])->toArray(),
57
+ 'providers' => ServiceProvider::defaultProviders()->replace([
58
+ Illuminate\Translation\TranslationServiceProvider::class => InternetGuru\LaravelCommon\TranslationServiceProvider::class,
59
+ ])->toArray(),
61
60
```
62
61
63
62
## Carbon Interval Cast
@@ -88,11 +87,11 @@ class Task extends Model
88
87
89
88
Key Features:
90
89
91
- - ** Automatic Path Parsing** : Automatically parses the current URL and generates breadcrumb items based on your routes and translations.
92
- - ** Customizable Divider** : Allows customization of the divider symbol between breadcrumb items.
93
- - ** Localization Support** : Supports translation of breadcrumb items using Laravel's localization system.
94
- - ** Short and Long Labels** : Supports both short and long labels for breadcrumb items.
95
- - ** Segment Skipping** : Optionally skip a specified number of URL segments, useful for nested routes or prefixes.
90
+ - ** Automatic Path Parsing** : Automatically parses the current URL and generates breadcrumb items based on your routes and translations.
91
+ - ** Customizable Divider** : Allows customization of the divider symbol between breadcrumb items.
92
+ - ** Localization Support** : Supports translation of breadcrumb items using Laravel's localization system.
93
+ - ** Short and Long Labels** : Supports both short and long labels for breadcrumb items.
94
+ - ** Segment Skipping** : Optionally skip a specified number of URL segments, useful for nested routes or prefixes.
96
95
97
96
Usage:
98
97
@@ -101,7 +100,7 @@ Usage:
101
100
<x-ig::breadcrumb />
102
101
<!-- You can change the divider symbol by setting the divider attribute -->
103
102
<x-ig::breadcrumb divider =" |" />
104
- <!-- If you need to skip certain segments of the URL (e.g., an language prefix), use the skipFirst attribute -->
103
+ <!-- If you need to skip certain segments of the URL (e.g., a language prefix), use the skipFirst attribute -->
105
104
<x-ig::breadcrumb :skipFirst =" 1" />
106
105
```
107
106
@@ -146,7 +145,7 @@ Example:
146
145
147
146
### System Messages
148
147
149
- > The `messages` Blade component renders system success messages and errros messages.
148
+ > The `messages` Blade component renders system success messages and error messages.
150
149
151
150
Include the component in your Blade template where you want the system messages to appear:
152
151
0 commit comments