-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editar Empresas en clientes va de vuelta a home
- Loading branch information
elyambay
committed
Sep 21, 2017
1 parent
1cd7e6f
commit a734573
Showing
45 changed files
with
546 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,6 @@ class VerifyCsrfToken extends BaseVerifier | |
* @var array | ||
*/ | ||
protected $except = [ | ||
// | ||
'/logout' | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class beneficios_cabecera_encuesta extends Model | ||
{ | ||
protected $table = "beneficios_cabecera_encuestas"; | ||
|
||
protected $fillable = ["empresa_id", "rubro_id", "sub_rubro_id", "cantidad_empleados", "cantidad_sucursales", "periodo", "finalizada"]; | ||
|
||
public function empresa(){ | ||
return $this->belongsTo('App\Empresa'); | ||
} | ||
|
||
public function rubro(){ | ||
return $this->belongsTo('App\Rubro'); | ||
} | ||
|
||
public function subRubro(){ | ||
return $this->belongsTo('App\Sub_rubro'); | ||
} | ||
|
||
public function detalleBeneficio(){ | ||
return $this->hasMany("App\beneficios_respuesta"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class beneficios_opcion extends Model | ||
{ | ||
protected $table = "beneficios_opciones"; | ||
|
||
protected $fillable = ["beneficios_pregunta_id", "opcion"]; | ||
|
||
public function beneficioPregunta(){ | ||
return $this->belongsTo('App\beneficios_pregunta'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class beneficios_pregunta extends Model | ||
{ | ||
protected $table = "beneficios_preguntas"; | ||
|
||
protected $fillable = ["pregunta", "cerrada"]; | ||
|
||
public function beneficiosOpcion(){ | ||
return $this->hasMany('App\beneficios_opcion') | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class beneficios_respuesta extends Model | ||
{ | ||
// | ||
} |
33 changes: 33 additions & 0 deletions
33
database/migrations/2017_09_19_183819_create_beneficios_preguntas_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBeneficiosPreguntasTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('beneficios_preguntas', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('pregunta', 200); | ||
$table->string('cerrada', 1); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('beneficios_preguntas'); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
database/migrations/2017_09_19_183845_create_beneficios_opcions_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBeneficiosOpcionsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('beneficios_opciones', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->integer('beneficios_pregunta_id')->unsigned(); | ||
$table->string('opcion', 200); | ||
$table->timestamps(); | ||
|
||
$table->foreign('beneficios_pregunta_id') | ||
->references('id') | ||
->on('beneficios_preguntas') | ||
->onUpdate('cascade') | ||
->onDelete('restrict'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('beneficios_opciones', function(Blueprint $table){ | ||
$table->dropForeign(['beneficios_pregunta_id']); | ||
}); | ||
|
||
Schema::dropIfExists('beneficios_opciones'); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
database/migrations/2017_09_19_183859_create_beneficios_respuestas_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class CreateBeneficiosRespuestasTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('beneficios_respuestas', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->integer('beneficios_pregunta_id')->unsigned(); | ||
$table->integer('beneficios_opcion_id')->unsigned()->nullable(); | ||
$table->string('abierta', 1000)->nullable(); | ||
$table->timestamps(); | ||
|
||
$table->foreign('beneficios_pregunta_id') | ||
->references('id') | ||
->on('beneficios_preguntas') | ||
->onUpdate('cascade') | ||
->onDelete('restrict'); | ||
|
||
$table->foreign('beneficios_opcion_id') | ||
->references('id') | ||
->on('beneficios_opciones') | ||
->onUpdate('cascade') | ||
->onDelete('restrict'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('beneficios_respuestas', function(Blueprint $table){ | ||
$table->dropForeign(['beneficios_pregunta_id']); | ||
$table->dropForeign(['beneficios_opcion_id']); | ||
}); | ||
|
||
Schema::dropIfExists('beneficios_respuestas'); | ||
} | ||
} |
Oops, something went wrong.