Skip to content

Commit

Permalink
rename organization in organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Feb 28, 2024
1 parent f0d033c commit b267547
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace App\Http\Controllers;

use App\Http\Resources\OrganizationResource;
use App\Http\Resources\OrganisationResource;
use App\Models\Organisation;

class OrganizationController extends Controller
class OrganisationController extends Controller
{
public function __invoke()
{
return OrganizationResource::collection(
return OrganisationResource::collection(
Organisation::query()
->withoutEagerLoads(['city'])
->select([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class OrganizationResource extends JsonResource
class OrganisationResource extends JsonResource
{
/**
* Transform the resource into an array.
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Resources/ResourceResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function toArray(Request $request): array
'id' => $this->id,
'name' => $this->name,
'county' => $this->county->name,
'organization' => IdAndNameResource::make($this->organisation),
'organisation' => IdAndNameResource::make($this->organisation),
'category' => IdAndNameResource::make($this->category),
'subcategory' => IdAndNameResource::make($this->subcategory),
'types' => IdAndNameResource::collection($this->types),
Expand Down
4 changes: 2 additions & 2 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

use App\Http\Controllers\OrganizationController;
use App\Http\Controllers\OrganisationController;
use App\Http\Controllers\ResourceController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
Expand All @@ -20,7 +20,7 @@
Route::middleware('auth:sanctum')
->prefix('/v1')
->group(function () {
Route::get('/organizations', OrganizationController::class);
Route::get('/organisations', OrganisationController::class);
Route::get('/resources', ResourceController::class);
});

Expand Down

0 comments on commit b267547

Please sign in to comment.