Closed bezhermoso closed 2 years ago
Addresses https://github.com/square/laravel-hyrule/issues/7
$builder = Hyrule::create() ->file('avatar') ->image() ->dimensions() ->ratio(1) ->maxWidth(1000) ->end() ->end() ->string('username') // etc.
$builder = Hyrule::create() ->file('scan') ->mimeType() ->allow('application/pdf') ->image('jpg', 'png') // allows image/jpg & image/png ->end() ->string('username') // etc.
$builder = Hyrule::create() ->array('attachments') ->between(1, 10) ->each('file') ->mimeType() ->allow('application/pdf') ->image('jpg', 'png') // allows image/jpg & image/png ->text('plain', 'html') // allows text/plain & text/html ->video('mp4') // allows video/mp4 ->end() ->end() ->end() ->string('username') // etc.
Addresses https://github.com/square/laravel-hyrule/issues/7
Example 1: Images
Example 2: Other MIME types
Example 3: Array of files