updated README
This commit is contained in:
parent
d2062d244e
commit
8c721de6cd
@ -36,8 +36,6 @@ When declaring a new model, extend the Meta model:
|
|||||||
|
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Glmdev\Meta\Meta;
|
|
||||||
|
|
||||||
class Post extends Meta
|
class Post extends Meta
|
||||||
{
|
{
|
||||||
// fillable, hidden, etc. arrays
|
// fillable, hidden, etc. arrays
|
||||||
@ -53,6 +51,9 @@ To generate a migration for a new meta-model, use the following command:
|
|||||||
$ php artisan meta:migration name_of_migration --create=table_name
|
$ php artisan meta:migration name_of_migration --create=table_name
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> (The `meta:migration` command extends the `make:migration`, so it contains all of the original functionality.)
|
||||||
|
|
||||||
|
|
||||||
Add your custom fields, if any, then migrate as usual:
|
Add your custom fields, if any, then migrate as usual:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
@ -69,8 +70,6 @@ public function createPost () {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
(The `meta:migration` command extends the `make:migration`, so it contains all of the original functionality.)
|
|
||||||
|
|
||||||
But now, you have access to a universal identifier for every model in the entire project.
|
But now, you have access to a universal identifier for every model in the entire project.
|
||||||
|
|
||||||
You can check if a model has a UUID, and get it if it does:
|
You can check if a model has a UUID, and get it if it does:
|
||||||
|
Loading…
Reference in New Issue
Block a user