protected function addCategory($types, $place)
 {
     foreach ($types as $mcategoria) {
         $cat = new \app\models\CategoryGoogle();
         $catExist = $cat->findOne(["name" => $mcategoria]);
         if ($catExist == null) {
             $cat->name = $mcategoria;
             if (!$cat->save()) {
                 $this->valid = false;
             }
             $catExist = $cat->findOne(["name" => $cat->name]);
         }
         //            $catExist->icon = $place->icon;
         $catExist->update();
         $placeCategory = new \app\models\PlaceCategory();
         $placeCategory->place_id = $place->place_id;
         $placeCategory->categoria_id = $catExist->id;
         if (!$placeCategory->save()) {
             $this->valid = false;
         }
     }
 }
            <?php 
echo $form->field($model, 'radius')->textInput();
?>

            <?php 
echo $form->field($model, 'query')->textInput();
?>

            <?php 
echo $form->field($model, 'keyword')->textInput();
?>

        </div>
        <div class="col-lg-6">
            <?php 
$items = \yii\helpers\ArrayHelper::map(app\models\CategoryGoogle::find()->orderBy('nombre')->all(), 'name', 'nombre');
echo $form->field($model, 'types')->checkboxList($items, ['class' => 'checkbox']);
?>
        </div>
    </div>



    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
use app\models\Categorias;
use yii\web\View;
use app\assets\latLongPickerAsset;
use app\models\Lugares;
use yii\helpers\Html;
use app\assets\openLayerAsset;
//latLongPickerAsset::register($this);
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
openLayerAsset::register($this);
//$this->params['punto'] = $punto->attributes;
$categorias = app\models\CategoryGoogle::find()->all();
?>
<div class="jumbotron">
    <h1>Bienvenido a Las Grutas</h1>
    <p>En este lugar podra encontrar todo lo que necesite para disfrutar de su estadia en nuestra localidad, Usted podra acceder a toda la información de Hoteles Restaurantes y atracciones para sus vacaciones</p>
    <p><?php 
echo Html::a('Agregar Sitio de Interes', ['create'], ['class' => 'btn btn-success']);
?>
</p>
    <div class="row">
        <ul class="nav nav-pills ">
            <?php 
foreach ($categorias as $categoria) {
    $this->params['menu'][] = ['label' => $categoria->name];
}
foreach ($categorias as $categoria) {