<?php $this->renderFeedbackMessages(); ?> <section class="col s12" > <h1 class="center">Tus materiales</h1> <form method="post" action="<?php echo Config::get('URL'); ?> material/create" enctype="multipart/form-data"> <div class="row"> <div class="input-field col s12 m4"> <select name="material_provider_id" > <option value="" >- Selecciona -</option> <?php $providers = ProviderModel::getAllProviders(); foreach ($providers as $key => $value) { ?> <option value="<?php echo $value->provider_id; ?> "><?php echo $value->provider_name; ?> </option> <?php } ?> </select> <label for="material_provider_id" >Proveedor</label> </div>
/** * This method controls what happens when you move to /provider/index in your app. * Gets all providers (of the user). */ public function index() { $this->View->render('provider/index', array('providers' => ProviderModel::getAllProviders())); }