PHP Classes

File: site/demos/form-image.php

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   site/demos/form-image.php   Download  
File: site/demos/form-image.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Caelrik
Build Web user interface from PHP components
Author: By
Last change:
Date: 8 days ago
Size: 413 bytes
 

 

Contents

Class file image Download
<?php

use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;

return Form::make('profile')
    ->action('/profile/picture')
    ->add(
        Field::file('picture', 'Profile picture')
            ->required()
            ->imageEditor(['1:1', 'free'], 512)
            ->help('Choose a picture from your device: it is edited here, and sent at most 512 pixels wide.'),
    )
    ->submit('Save');