An open API service indexing awesome lists of open source software.

https://github.com/lassehaslev/laravelfieldable


https://github.com/lassehaslev/laravelfieldable

Last synced: about 2 months ago
JSON representation

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
```