https://github.com/lassehaslev/laravelfieldable
https://github.com/lassehaslev/laravelfieldable
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lassehaslev/laravelfieldable
- Owner: LasseHaslev
- Created: 2016-11-16T20:11:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-04T14:43:23.000Z (over 9 years ago)
- Last Synced: 2025-01-05T09:28:53.258Z (over 1 year ago)
- Language: PHP
- Size: 87.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lassehaslev/fieldable
>>> Warning!! This package is under development and app breaking changes will come before release!!
## Install
``` bash
composer require lassehaslev/laravel-fieldable
```
## Usage
## API
#### FieldType
``` php
// Add new FieldType
$fieldType = FieldType::add([
'name'=>'FieldType name',
'view'=>'rellative path from config( 'fieldable.views.fields' )'
]);
// Get the full path to the field type view
// To overwrite the setting, edit fieldable.views.path in config/fieldable.php
$fieldType->viewPath();
```
## Development
#### Install dependencies
``` bash
# Install dependencies
composer install
# Install dependencies for automatic tests
yarn
```
#### Runing tests
``` bash
# Run one time
npm run test
# Automaticly run test on changes
npm run dev
```