This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
309f93d
commit 5c8d0ff
Showing
2 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## From v1 to v2 | ||
|
||
The way components are registered is greatly simplified. | ||
|
||
In `v1` you could pass a custom tag of your component as a second parameter. In `v2` you'll need to use the `tag` method. | ||
|
||
```php | ||
// v1 | ||
BladeX::component('components.myAlert', 'my-custom-tag') | ||
|
||
// v2 | ||
BladeX::component('components.myAlert')->tag('my-custom-tag'); | ||
``` | ||
|
||
In v1 you could register an entire directory of components using the `components()` method. This method has now been deprecated. Use the `component` method and the `.*` notation to register a directory. | ||
|
||
```php | ||
// v1 | ||
BladeX::components('components'); | ||
|
||
// v2 | ||
BladeX::component('components.*'); | ||
``` |