Skip to content

Commit 722a09f

Browse files
committed
first commit
0 parents  commit 722a09f

18 files changed

+8328
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor

README.md

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Builder Block
2+
3+
![builder-block](./assets/logo.png)
4+
5+
<p align="center">
6+
<a href="https://packagist.org/packages/rmitesh/builder-block"><img alt="Latest Stable Version" src="https://img.shields.io/packagist/v/rmitesh/builder-block.svg?style=for-the-badge"></a>
7+
<a href="https://packagist.org/packages/rmitesh/builder-block"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/rmitesh/builder-block.svg?style=for-the-badge"></a>
8+
<a href="https://laravel.com"><img alt="Laravel v10.x" src="https://img.shields.io/badge/Laravel-v10.x-FF2D20?style=for-the-badge&logo=laravel"></a>
9+
<a href="https://php.net"><img alt="PHP 8.1" src="https://img.shields.io/badge/PHP-8.1-777BB4?style=for-the-badge&logo=php"></a>
10+
</p>
11+
12+
Builder Block is collection of prebuilt Builder block of Filament for the CMS pages.
13+
Everything will store in JSON format, using this data you can display content dynamically.
14+
15+
If you are using ![filament-fabricator][https://github.com/Z3d0X/filament-fabricator] then this is perfact package for your dynamic pages.
16+
17+
It comes with following blocks:
18+
19+
1. Hero section (Left and right side)
20+
![builder-block](./assets/screenshots/hero-section.png)
21+
22+
2. Cards
23+
![builder-block](./assets/screenshots/cards.png)
24+
25+
3. Mini states
26+
![builder-block](./assets/screenshots/mini-states.png)
27+
28+
4. Information boxes
29+
![builder-block](./assets/screenshots/information-box.png)
30+
31+
5. FAQs
32+
![builder-block](./assets/screenshots/faq.png)
33+
34+
35+
## Installation
36+
37+
You can install the package via composer:
38+
39+
```bash
40+
composer require rmitesh/builder-block
41+
```
42+
43+
## How to use
44+
45+
```php
46+
use Filament\Forms;
47+
use Filament\Forms\Form;
48+
use Rmitesh\BuilderBlock\Facades\BuilderBlock;
49+
50+
public static function form(Form $form): Form
51+
{
52+
return $form
53+
->schema([
54+
// your components ...
55+
56+
Forms\Components\Builder::make('content')
57+
->blocks(
58+
BuilderBlock::make()
59+
->get(),
60+
),
61+
62+
// your components ...
63+
]);
64+
}
65+
```
66+
67+
and if you want to add your custom blocks then you can add using `addBlock` function.
68+
69+
```php
70+
BuilderBlock::make()
71+
->addBlock(
72+
Forms\Components\Builder\Block::make('my_custom_block')
73+
->columns(4)
74+
->icon('heroicon-m-information-circle')
75+
->schema([
76+
// add your form components
77+
]),
78+
)
79+
->get()
80+
```
81+
82+
Also, you can add multiple blocks using `addBlocks` function.
83+
84+
```php
85+
BuilderBlock::make()
86+
->addBlocks([
87+
Forms\Components\Builder\Block::make('my_custom_block_1')
88+
->columns(4)
89+
->icon('heroicon-m-information-circle')
90+
->schema([
91+
// add your form components
92+
]),
93+
94+
Forms\Components\Builder\Block::make('my_custom_block_2')
95+
->columns(4)
96+
->icon('heroicon-m-information-circle')
97+
->schema([
98+
// add your form components
99+
]),
100+
])
101+
->get()
102+
```
103+
104+
## Changelog
105+
106+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
107+
108+
## Contributing
109+
110+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
111+
112+
## Security Vulnerabilities
113+
114+
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
115+
116+
## Credits
117+
118+
- [Mitesh Rathod](https://github.com/rmitesh)
119+
- [All Contributors](../../contributors)
120+
121+
## License
122+
123+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

assets/logo.png

46.8 KB
Loading

assets/screenshots/cards.png

111 KB
Loading

assets/screenshots/faq.png

153 KB
Loading

assets/screenshots/hero-section.png

101 KB
Loading
367 KB
Loading

assets/screenshots/mini-states.png

50.8 KB
Loading

composer.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "rmitesh/builder-block",
3+
"description": "This is builder-block component for Filament",
4+
"type": "library",
5+
"keywords": [
6+
"rmitesh",
7+
"laravel",
8+
"builder-block"
9+
],
10+
"require": {
11+
"filament/filament": "^3.2",
12+
"filament/forms": "^3.2"
13+
},
14+
"license": "MIT",
15+
"autoload": {
16+
"psr-4": {
17+
"Rmitesh\\BuilderBlock\\": "src/"
18+
}
19+
},
20+
"authors": [
21+
{
22+
"name": "Mitesh Rathod",
23+
"email": "miteshr32@gmail.com"
24+
}
25+
],
26+
"extra": {
27+
"laravel": {
28+
"providers": [
29+
"Rmitesh\\BuilderBlock\\BuilderBlockServiceProvider"
30+
]
31+
}
32+
},
33+
"minimum-stability": "dev",
34+
"prefer-stable": true
35+
}

0 commit comments

Comments
 (0)