Skip to content

Commit c0d674b

Browse files
committed
update README.md
1 parent 9fe5fb3 commit c0d674b

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Laravel Easy Panel
55
A flexible and beautiful admin panel based on Livewire with lots of feature.
66

7-
<img src="https://linkpicture.com/q/Screenshot-2020-11-07-201015.png">
7+
![EasyPanel screenshots](https://linkpicture.com/q/Screenshot-2020-11-07-201015.png)
88

99
# Features:
1010

@@ -45,7 +45,14 @@ and you set the `todo` key in your config to `true`
4545
After run the `install:admin` command you are able to edit config file in `config/easy_panel.php`
4646
There are lots of feature in config file you can edit or manage.
4747

48-
Imagine you want to create a CRUD action for a model, You can edit `actions` key in your config file like the basic example.
48+
## CRUD Management
49+
To create a CRUD action you can run this command :
50+
```
51+
php artisan panel:config article -m Article
52+
```
53+
it will create a crud config in `resources/cruds` directory for article action and Article model (action must be equal to model name)
54+
55+
and next You should pass action name in `actions` key in your config file in `config` directory.
4956

5057
To create CRUDs action for all keys you must run this command :
5158
```bash
@@ -70,10 +77,27 @@ There are some important notes about actions in your config file :
7077
- every fields (values in your db) should be passed in `fields` key
7178
- pass the true address of model
7279

73-
After run this command you are able to edit and customize your CRUD in your project
80+
After run these commands you are able to edit and customize your CRUD style and component in your project
7481
- PHP Components address : `app/Http/Livewire/Admin/[ActionKey]`
7582
- Blade Components address : `resources/views/livewire/admin/[actionKey]`
7683

84+
So let's install and create a CRUD action for User model in 2 minutes.
85+
86+
1.After install the package with composer in project, we install admin panel :
87+
88+
![Installation](https://aminireza.ir/dl/install.png)
89+
90+
91+
2.Next we should create a crud action config for `user` :
92+
93+
![Config creation](https://aminireza.ir/dl/config.png)
94+
95+
3.after edit and customize the action config we must create CRUD component and it's EasyPanel magic 😎.
96+
97+
![crud creator](https://aminireza.ir/dl/crud.png)
98+
99+
Done, We created a panel with user manager option in 3 steps :)
100+
77101
#### Create/Delete admin
78102

79103
There are 2 commands in EasyPanel which uses UserProvider class to set a user as an admin or remove it.
@@ -102,8 +126,8 @@ php artisan panel:remove 1
102126

103127
- What is `show` key in every action in config file ? It specifies what's column should be showed in CRUD list.
104128
For example you want to show only title in your articles list, you can just pass the `title` to the `show` key in config file.
105-
106-
- `extra_values` : Imagine you want pass a default data when you want to create an article or anything, and you want to pass `user_id` in you create method, you can set `user_id` in your `extra_values` key (If you want to write some code, place codes between " or ' )
129+
- `actions` : every CRUD you want to have. If you want to disable a crud in panel just remove it from `actions` key in config file.
130+
- `extra_values` in cruds' config : Imagine you want pass a default data when you want to create an article or anything, and you want to pass `user_id` in you create method, you can set `user_id` in your `extra_values` key (If you want to write some code, place codes between " or ' )
107131

108132
## What we use in this package:
109133
- [AdminMart Template](https://adminmart.com/)

0 commit comments

Comments
 (0)