TypeRocket / core

TypeRocket core source files where all the magic lives.
https://typerocket.com
36 stars 21 forks source link

Enhancements #25

Closed zackphilipps closed 5 years ago

zackphilipps commented 5 years ago

@kevindees happy new year! There's a lot going on here, let me know if you want me to pull anything out. Also, idk why my builds keep failing 🤷‍♂️

zackphilipps commented 5 years ago

hey @kevindees let me know when you can get to reviewing this and #23

kevindees commented 5 years ago

Hey @zackphilipps

I'm still checking on the Laravel style accessor feature. Can you make a pull request with everything but the Laravel accessor feature?

I think that commit needs to be cleaned up a little too. There are a few comments that need to be cleaned out or features completed it looks like.

Thanks, Kevin

zackphilipps commented 5 years ago

Here ya go. I'll do another PR for accessors.

zackphilipps commented 5 years ago

Docs for restricted mime types:

When adding a file field, you can set the allowed mime types to be uploaded:

echo $form->file('File')->setSetting('type', 'text/csv');
echo $form->file('File')->setSetting('type', 'image/svg+xml');

Any of these mime types will work, and the following common use cases will also work:

echo $form->file('File')->setSetting('type', 'audio');
echo $form->file('File')->setSetting('type', 'video');
echo $form->file('File')->setSetting('type', 'pdf');

Docs for additional meta box location rules:

You can also add a meta box to a specific page template:

tr_meta_box('Box')->addScreen('front_page');
tr_meta_box('Box')->addScreen('posts_page');
tr_meta_box('Box')->addScreen('page-example.php');

@kevindees again, let me know if you want me to just pull the invalid method out. It would just allow devs to write something like if($this->invalid()) return tr_redirect() within a controller.