You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webrium console provides a series of features to the developer and tries to make some tasks easier. For example, it can be used to create controller files or models, or view the list of databases or tables, etc.
6
4
7
-
<br>
5
+
The Webrium Console Commands include tools for generating files, calling methods, and managing databases. Below is a list of available commands and how to use them.
6
+
8
7
9
-
## Model operation
8
+
## Generate a Model
10
9
11
-
### Create a model
10
+
The make:model command creates a new model file in the models directory. You can create either a simple model or a database-connected model.
By using `--table` or `-t` according to the name of the model (for example, `User`), the name of the `users` table is automatically created and set in the model.
17
+
-**ModelName** : The name of the model (e.g., User).
18
+
-**--table|-t**: Specify the database table name (e.g., users). If omitted, the model name is converted to snake_case and pluralized (e.g., User becomes users).
19
+
-**--force|-f**: Overwrite the model file if it already exists.
20
+
-**--no-plural**: Prevent adding an "s" to the table name (e.g., User stays user instead of users).
19
21
22
+
#### Example
23
+
```
24
+
php webrium make:model User --table=users
25
+
```
26
+
Or instead of that
20
27
```
21
-
php webrium make:model User --table
22
-
or
23
28
php webrium make:model User -t
24
29
```
25
30
26
-
You can also specify the desired table name
31
+
This creates a User.php model file in the models directory, linked to the users table.
27
32
28
-
```
29
-
php webrium make:model User --table=my_custom_table_name
30
-
```
31
33
32
34
## Controller operation
33
35
34
36
35
-
### Create a controller:
36
-
In the example below, the `AuthController.php` file is created
37
+
### Generate a Controller
38
+
39
+
The make:controller command creates a new controller file in the controllers directory.
There is also a feature for developers who want to develop Telegram bots
145
-
We use [BotFire](github.com/botfire/botfire/) library for Telegram bot. And using the following commands, the initial configuration is created to implement the robot
0 commit comments