Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Contracts/RestifySearchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Binaryk\LaravelRestify\Contracts;

use Binaryk\LaravelRestify\Http\Requests\RestifyRequest;

/**
* @author Eduard Lupacescu <eduard.lupacescu@binarcode.com>
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Fields/RulesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait RulesTrait
public $storingRules = [];

/**
* Rules for applied when update model
* Rules for applied when update model.
* @var array
*/
public $updatingRules = [];
Expand Down Expand Up @@ -47,7 +47,7 @@ public function storingRules($rules)
}

/**
* Validation rules for update
* Validation rules for update.
*
* @param callable|array|string $rules
* @return RulesTrait
Expand Down
2 changes: 0 additions & 2 deletions src/Http/Controllers/RepositoryUpdateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ public function handle(RepositoryUpdateRequest $request)
return $this->response()->invalid()->errors($validator->errors()->toArray())->respond();
}


$repository = DB::transaction(function () use ($request, $repository, $model) {

[$model] = $repository::fillWhenUpdate($request, $model);

$model->save();
Expand Down
3 changes: 1 addition & 2 deletions src/Repositories/ValidatingTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public static function validateForUpdate(RestifyRequest $request, $resource = nu
static::validatorForUpdate($request, $resource)->validate();
}


/**
* @param RestifyRequest $request
* @param null $resource
Expand Down Expand Up @@ -136,7 +135,7 @@ public function getUpdatingRules(RestifyRequest $request)
{
return $this->collectFields($request)->mapWithKeys(function (Field $k) {
return [
$k->attribute => $k->getUpdatingRules()
$k->attribute => $k->getUpdatingRules(),
];
})->toArray();
}
Expand Down