Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Actualizaciones menores
Browse files Browse the repository at this point in the history
  • Loading branch information
llstarscreamll committed Oct 5, 2016
1 parent 99e0bc0 commit 51f6926
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Providers/RouteGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function generateRoute()
// restaurar archivos de papelera
if ($this->hasDeletedAtColumn($this->fields)) {

$restore_route = "Route::put(\n\t'/{$this->route()}/restore/{{$this->modelClassName()}}',\n\t[\n\t'as' => '{$this->route()}.restore',\n\t'uses' => '{$this->controllerClassName()}@restore'\n\t]\n);\n";
$restore_route = "Route::put(\n\t'/{$this->route()}/restore/{{$this->table_name}}',\n\t[\n\t'as' => '{$this->route()}.restore',\n\t'uses' => '{$this->controllerClassName()}@restore'\n\t]\n);\n";
$route = $restore_route.$route;

}
Expand Down
2 changes: 2 additions & 0 deletions src/Resources/Views/GeneratorTemplates/model.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public static function findRequested($request)
// ordenamos los resultados
$request->get('sort') and $query->orderBy($request->get('sort'), $request->get('sortType', 'asc'));

!$request->has('sort') and $query->orderBy('created_at', 'desc');

// paginamos los resultados
return $query->paginate(15);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class {{$test}} extends Base

public function __construct(\FunctionalTester $I)
{
$this->functionalTester = $I;
parent::__construct($I);

$this->initUIMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class {{$test}} extends Base

public function __construct(\FunctionalTester $I)
{
$this->functionalTester = $I;
parent::__construct($I);

self::$deleteBtn = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class {{$test}} extends Base

public function __construct(\FunctionalTester $I)
{
$this->functionalTester = $I;
parent::__construct($I);

self::$linkToEdit = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class {{$test}} extends Base

public function __construct(\FunctionalTester $I)
{
$this->functionalTester = $I;
parent::__construct($I);

self::$title = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class {{$test}} extends Base

public function __construct(\FunctionalTester $I)
{
$this->functionalTester = $I;
parent::__construct($I);

self::$title = [
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Views/GeneratorTemplates/views/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@include ('<?=config('llstarscreamll.CrudGenerator.config.layout-namespace')?>layout.notifications')
</div>

<div class="panel-body">
<div class="box-body">

{!! Form::open(['route' => '<?=$gen->route()?>.store', 'method' => 'POST', 'name' => 'create-<?=$gen->getDashedModelName()?>-form']) !!}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Views/GeneratorTemplates/views/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@include ('<?=config('llstarscreamll.CrudGenerator.config.layout-namespace')?>layout.notifications')
</div>

<div class="panel-body">
<div class="box-body">

{!! Form::model($<?=$gen->modelVariableName()?>, ['route' => ['<?=$gen->route()?>.update', $<?=$gen->modelVariableName()?>->id], 'method' => 'PUT', 'name' => 'edit-<?=$gen->getDashedModelName()?>-form']) !!}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Views/GeneratorTemplates/views/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@include ('<?=config('llstarscreamll.CrudGenerator.config.layout-namespace')?>layout.notifications')
</div>

<div class="panel-body">
<div class="box-body">

{!! Form::model($<?=$gen->modelVariableName()?>, ['name' => 'show-<?=$gen->getDashedModelName()?>-form', 'data-show' => ($show = true)]) !!}

Expand Down

0 comments on commit 51f6926

Please sign in to comment.