- Added new apis
This commit is contained in:
@@ -96,7 +96,8 @@ class ArtController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$art->is_like = $this->isLiked($art->id);
|
$art->is_like = $this->isLiked($art->id);
|
||||||
$art->note = Note::select('id', 'note', 'color_code', 'created_at')->where('user_id', auth()->user()->id)->where('art_id', $id)->get();
|
$art->note = Note::select('id', 'note', 'color_code', 'created_at')->where('user_id', auth()->id())->where('art_id', $id)->get();
|
||||||
|
$art->highlight = \App\Models\ArtHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')->where('user_id', auth()->id())->where('art_id', $id)->get();
|
||||||
$art->category = $law?->category?->name;
|
$art->category = $law?->category?->name;
|
||||||
$art->route = array_values($this->route(Art::class, $art));
|
$art->route = array_values($this->route(Art::class, $art));
|
||||||
|
|
||||||
@@ -109,7 +110,8 @@ class ArtController extends Controller
|
|||||||
if ($previousArt) {
|
if ($previousArt) {
|
||||||
$previousLaw = Law::find($previousArt->law_id);
|
$previousLaw = Law::find($previousArt->law_id);
|
||||||
$previousArt->is_like = $this->isLiked($previousArt->id);
|
$previousArt->is_like = $this->isLiked($previousArt->id);
|
||||||
$previousArt->note = Note::select('id', 'note', 'color_code')->where('user_id', auth()->user()->id)->where('art_id', $previousArt->id)->get();
|
$previousArt->note = Note::select('id', 'note', 'color_code')->where('user_id', auth()->id())->where('art_id', $previousArt->id)->get();
|
||||||
|
$previousArt->highlight = \App\Models\ArtHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')->where('user_id', auth()->id())->where('art_id', $previousArt->id)->get();
|
||||||
$previousArt->category = $previousLaw?->category?->name;
|
$previousArt->category = $previousLaw?->category?->name;
|
||||||
$previousArt->route = array_values($this->route(Art::class, $previousArt));
|
$previousArt->route = array_values($this->route(Art::class, $previousArt));
|
||||||
}
|
}
|
||||||
@@ -123,7 +125,8 @@ class ArtController extends Controller
|
|||||||
if ($nextArt) {
|
if ($nextArt) {
|
||||||
$nextLaw = Law::find($nextArt->law_id);
|
$nextLaw = Law::find($nextArt->law_id);
|
||||||
$nextArt->is_like = $this->isLiked($nextArt->id);
|
$nextArt->is_like = $this->isLiked($nextArt->id);
|
||||||
$nextArt->note = Note::select('id', 'note', 'color_code')->where('user_id', auth()->user()->id)->where('art_id', $nextArt->id)->get();
|
$nextArt->note = Note::select('id', 'note', 'color_code')->where('user_id', auth()->id())->where('art_id', $nextArt->id)->get();
|
||||||
|
$nextArt->highlight = \App\Models\ArtHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')->where('user_id', auth()->id())->where('art_id', $nextArt->id)->get();
|
||||||
$nextArt->category = $nextLaw?->category?->name;
|
$nextArt->category = $nextLaw?->category?->name;
|
||||||
$nextArt->route = array_values($this->route(Art::class, $nextArt));
|
$nextArt->route = array_values($this->route(Art::class, $nextArt));
|
||||||
}
|
}
|
||||||
|
|||||||
58
app/Http/Controllers/api/ArtHighlightController.php
Normal file
58
app/Http/Controllers/api/ArtHighlightController.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\api;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\ArtHighlight;
|
||||||
|
use App\Traits\BaseApiResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ArtHighlightController extends Controller
|
||||||
|
{
|
||||||
|
use BaseApiResponse;
|
||||||
|
|
||||||
|
public function create(Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'art_id' => 'required',
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
ArtHighlight::create([
|
||||||
|
'user_id' => auth()->id(),
|
||||||
|
'art_id' => $validated['art_id'],
|
||||||
|
'start_index' => $validated['start_index'],
|
||||||
|
'end_index' => $validated['end_index'],
|
||||||
|
'selected_text' => $validated['selected_text'],
|
||||||
|
'color_code' => $validated['color_code'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $this->success([], 'موفق', 'هایلایت با موفقیت اضافه شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id, Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$highlight = ArtHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->update($validated);
|
||||||
|
|
||||||
|
return $this->success([], 'بروزرسانی', 'هایلایت با موفقیت بروزرسانی شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$highlight = ArtHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->delete();
|
||||||
|
|
||||||
|
return $this->success([], 'حذف', 'هایلایت با موفقیت حذف شد');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -126,6 +126,12 @@ class BylawApiController extends Controller
|
|||||||
->where('bylaw_document_id', $bylaw->id)
|
->where('bylaw_document_id', $bylaw->id)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
$formatted['highlight'] = \App\Models\BylawHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->where('bylaw_document_id', $bylaw->id)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
|
||||||
if (!$formatted['is_locked']) {
|
if (!$formatted['is_locked']) {
|
||||||
$eloquentNodes = BylawNode::with('type')
|
$eloquentNodes = BylawNode::with('type')
|
||||||
->where('document_id', $bylaw->id)
|
->where('document_id', $bylaw->id)
|
||||||
@@ -353,6 +359,11 @@ class BylawApiController extends Controller
|
|||||||
->where('bylaw_document_id', $item->id)
|
->where('bylaw_document_id', $item->id)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
$formatted['highlight'] = \App\Models\BylawHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->where('bylaw_document_id', $item->id)
|
||||||
|
->get();
|
||||||
|
|
||||||
return $formatted;
|
return $formatted;
|
||||||
})->values()->toArray();
|
})->values()->toArray();
|
||||||
|
|
||||||
|
|||||||
58
app/Http/Controllers/api/BylawHighlightController.php
Normal file
58
app/Http/Controllers/api/BylawHighlightController.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\api;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\BylawHighlight;
|
||||||
|
use App\Traits\BaseApiResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class BylawHighlightController extends Controller
|
||||||
|
{
|
||||||
|
use BaseApiResponse;
|
||||||
|
|
||||||
|
public function create(Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'bylaw_id' => 'required', // Clean request parameter
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
BylawHighlight::create([
|
||||||
|
'user_id' => auth()->id(),
|
||||||
|
'bylaw_document_id' => $validated['bylaw_id'], // Mapped to DB column
|
||||||
|
'start_index' => $validated['start_index'],
|
||||||
|
'end_index' => $validated['end_index'],
|
||||||
|
'selected_text' => $validated['selected_text'],
|
||||||
|
'color_code' => $validated['color_code'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $this->success([], 'موفق', 'هایلایت با موفقیت اضافه شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id, Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$highlight = BylawHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->update($validated);
|
||||||
|
|
||||||
|
return $this->success([], 'بروزرسانی', 'هایلایت با موفقیت بروزرسانی شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$highlight = BylawHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->delete();
|
||||||
|
|
||||||
|
return $this->success([], 'حذف', 'هایلایت با موفقیت حذف شد');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -163,21 +163,29 @@ class JudicialPrecedentApiController extends Controller
|
|||||||
});
|
});
|
||||||
})->orderBy('ruling_date', 'asc')->orderBy('id', 'asc')->first();
|
})->orderBy('ruling_date', 'asc')->orderBy('id', 'asc')->first();
|
||||||
|
|
||||||
// Apply format and add Notes
|
// Apply format and add Notes & Highlights
|
||||||
$formatWithNote = function($item) {
|
$formatWithNoteAndHighlight = function($item) {
|
||||||
if (!$item) return null;
|
if (!$item) return null;
|
||||||
$formatted = $this->formatItem($item);
|
$formatted = $this->formatItem($item);
|
||||||
|
|
||||||
$formatted['note'] = \App\Models\JudicialPrecedentNote::select('id', 'note', 'color_code', 'created_at')
|
$formatted['note'] = \App\Models\JudicialPrecedentNote::select('id', 'note', 'color_code', 'created_at')
|
||||||
->where('user_id', auth()->user()->id)
|
->where('user_id', auth()->id())
|
||||||
->where('judicial_precedent_id', $item->id)
|
->where('judicial_precedent_id', $item->id)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
// NEW: Fetch Highlights
|
||||||
|
$formatted['highlight'] = \App\Models\JudicialPrecedentHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->where('judicial_precedent_id', $item->id)
|
||||||
|
->get();
|
||||||
|
|
||||||
return $formatted;
|
return $formatted;
|
||||||
};
|
};
|
||||||
|
|
||||||
$results = array_values(array_filter([
|
$results = array_values(array_filter([
|
||||||
$previousItem ? $formatWithNote($previousItem) : null,
|
$previousItem ? $formatWithNoteAndHighlight($previousItem) : null,
|
||||||
$formatWithNote($current),
|
$formatWithNoteAndHighlight($current),
|
||||||
$nextItem ? $formatWithNote($nextItem) : null
|
$nextItem ? $formatWithNoteAndHighlight($nextItem) : null
|
||||||
]));
|
]));
|
||||||
|
|
||||||
return $this->success($results, 'Success', 'Pager Window Details');
|
return $this->success($results, 'Success', 'Pager Window Details');
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\api;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\JudicialPrecedentHighlight;
|
||||||
|
use App\Traits\BaseApiResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class JudicialPrecedentHighlightController extends Controller
|
||||||
|
{
|
||||||
|
use BaseApiResponse;
|
||||||
|
|
||||||
|
public function create(Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'judicial_id' => 'required',
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
JudicialPrecedentHighlight::create([
|
||||||
|
'user_id' => auth()->id(),
|
||||||
|
'judicial_precedent_id' => $validated['judicial_id'],
|
||||||
|
'start_index' => $validated['start_index'],
|
||||||
|
'end_index' => $validated['end_index'],
|
||||||
|
'selected_text' => $validated['selected_text'],
|
||||||
|
'color_code' => $validated['color_code'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $this->success([], 'موفق', 'هایلایت با موفقیت اضافه شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id, Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$highlight = JudicialPrecedentHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->update($validated);
|
||||||
|
|
||||||
|
return $this->success([], 'بروزرسانی', 'هایلایت با موفقیت بروزرسانی شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$highlight = JudicialPrecedentHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->delete();
|
||||||
|
|
||||||
|
return $this->success([], 'حذف', 'هایلایت با موفقیت حذف شد');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -172,21 +172,29 @@ class LegalOpinionApiController extends Controller
|
|||||||
}
|
}
|
||||||
})->orderBy('opinion_date', 'asc')->orderBy('id', 'asc')->first();
|
})->orderBy('opinion_date', 'asc')->orderBy('id', 'asc')->first();
|
||||||
|
|
||||||
// Apply format and add Notes
|
// Apply format and add Notes & Highlights
|
||||||
$formatWithNote = function($item) {
|
$formatWithNoteAndHighlight = function($item) {
|
||||||
if (!$item) return null;
|
if (!$item) return null;
|
||||||
$formatted = $this->formatItem($item);
|
$formatted = $this->formatItem($item);
|
||||||
|
|
||||||
$formatted['note'] = \App\Models\LegalOpinionNote::select('id', 'note', 'color_code', 'created_at')
|
$formatted['note'] = \App\Models\LegalOpinionNote::select('id', 'note', 'color_code', 'created_at')
|
||||||
->where('user_id', auth()->user()->id)
|
->where('user_id', auth()->id())
|
||||||
->where('legal_opinion_id', $item->id)
|
->where('legal_opinion_id', $item->id)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
// NEW: Fetch Highlights
|
||||||
|
$formatted['highlight'] = \App\Models\LegalOpinionHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->where('legal_opinion_id', $item->id)
|
||||||
|
->get();
|
||||||
|
|
||||||
return $formatted;
|
return $formatted;
|
||||||
};
|
};
|
||||||
|
|
||||||
$results = array_values(array_filter([
|
$results = array_values(array_filter([
|
||||||
$previousItem ? $formatWithNote($previousItem) : null,
|
$previousItem ? $formatWithNoteAndHighlight($previousItem) : null,
|
||||||
$formatWithNote($current),
|
$formatWithNoteAndHighlight($current),
|
||||||
$nextItem ? $formatWithNote($nextItem) : null
|
$nextItem ? $formatWithNoteAndHighlight($nextItem) : null
|
||||||
]));
|
]));
|
||||||
|
|
||||||
return $this->success($results, 'Success', 'Pager Window Details');
|
return $this->success($results, 'Success', 'Pager Window Details');
|
||||||
|
|||||||
58
app/Http/Controllers/api/LegalOpinionHighlightController.php
Normal file
58
app/Http/Controllers/api/LegalOpinionHighlightController.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\api;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\LegalOpinionHighlight;
|
||||||
|
use App\Traits\BaseApiResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class LegalOpinionHighlightController extends Controller
|
||||||
|
{
|
||||||
|
use BaseApiResponse;
|
||||||
|
|
||||||
|
public function create(Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'opinion_id' => 'required',
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
LegalOpinionHighlight::create([
|
||||||
|
'user_id' => auth()->id(),
|
||||||
|
'legal_opinion_id' => $validated['opinion_id'],
|
||||||
|
'start_index' => $validated['start_index'],
|
||||||
|
'end_index' => $validated['end_index'],
|
||||||
|
'selected_text' => $validated['selected_text'],
|
||||||
|
'color_code' => $validated['color_code'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $this->success([], 'موفق', 'هایلایت با موفقیت اضافه شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id, Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'start_index' => 'required|integer',
|
||||||
|
'end_index' => 'required|integer',
|
||||||
|
'selected_text' => 'nullable|string',
|
||||||
|
'color_code' => 'nullable|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$highlight = LegalOpinionHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->update($validated);
|
||||||
|
|
||||||
|
return $this->success([], 'بروزرسانی', 'هایلایت با موفقیت بروزرسانی شد');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
$highlight = LegalOpinionHighlight::where('user_id', auth()->id())->findOrFail($id);
|
||||||
|
$highlight->delete();
|
||||||
|
|
||||||
|
return $this->success([], 'حذف', 'هایلایت با موفقیت حذف شد');
|
||||||
|
}
|
||||||
|
}
|
||||||
8
app/Models/ArtHighlight.php
Normal file
8
app/Models/ArtHighlight.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ArtHighlight extends Model {
|
||||||
|
protected $fillable = ['user_id', 'art_id', 'start_index', 'end_index', 'selected_text', 'color_code'];
|
||||||
|
}
|
||||||
8
app/Models/BylawHighlight.php
Normal file
8
app/Models/BylawHighlight.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class BylawHighlight extends Model {
|
||||||
|
protected $fillable = ['user_id', 'bylaw_document_id', 'start_index', 'end_index', 'selected_text', 'color_code'];
|
||||||
|
}
|
||||||
8
app/Models/JudicialPrecedentHighlight.php
Normal file
8
app/Models/JudicialPrecedentHighlight.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class JudicialPrecedentHighlight extends Model {
|
||||||
|
protected $fillable = ['user_id', 'judicial_precedent_id', 'start_index', 'end_index', 'selected_text', 'color_code'];
|
||||||
|
}
|
||||||
8
app/Models/LegalOpinionHighlight.php
Normal file
8
app/Models/LegalOpinionHighlight.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class LegalOpinionHighlight extends Model {
|
||||||
|
protected $fillable = ['user_id', 'legal_opinion_id', 'start_index', 'end_index', 'selected_text', 'color_code'];
|
||||||
|
}
|
||||||
@@ -115,4 +115,29 @@ Route::prefix('v1')->middleware('auth:sanctum')->group(function () {
|
|||||||
Route::delete('/folders/{id}/bylaw/{bylaw_id}', [\App\Http\Controllers\api\FolderController::class, 'delete_bylaw']);
|
Route::delete('/folders/{id}/bylaw/{bylaw_id}', [\App\Http\Controllers\api\FolderController::class, 'delete_bylaw']);
|
||||||
Route::delete('/folders/{id}/judicial/{judicial_id}', [\App\Http\Controllers\api\FolderController::class, 'delete_judicial']);
|
Route::delete('/folders/{id}/judicial/{judicial_id}', [\App\Http\Controllers\api\FolderController::class, 'delete_judicial']);
|
||||||
Route::delete('/folders/{id}/opinion/{opinion_id}', [\App\Http\Controllers\api\FolderController::class, 'delete_opinion']);
|
Route::delete('/folders/{id}/opinion/{opinion_id}', [\App\Http\Controllers\api\FolderController::class, 'delete_opinion']);
|
||||||
|
|
||||||
|
// --- HIGHLIGHTS ---
|
||||||
|
Route::prefix('highlights')->middleware('auth:sanctum')->group(function () {
|
||||||
|
// Arts
|
||||||
|
Route::post('/art', [\App\Http\Controllers\api\ArtHighlightController::class, 'create']);
|
||||||
|
Route::put('/art/{id}', [\App\Http\Controllers\api\ArtHighlightController::class, 'update']);
|
||||||
|
Route::delete('/art/{id}', [\App\Http\Controllers\api\ArtHighlightController::class, 'destroy']);
|
||||||
|
|
||||||
|
// Bylaws
|
||||||
|
Route::post('/bylaw', [\App\Http\Controllers\api\BylawHighlightController::class, 'create']);
|
||||||
|
Route::put('/bylaw/{id}', [\App\Http\Controllers\api\BylawHighlightController::class, 'update']);
|
||||||
|
Route::delete('/bylaw/{id}', [\App\Http\Controllers\api\BylawHighlightController::class, 'destroy']);
|
||||||
|
|
||||||
|
// Judicial Precedents
|
||||||
|
Route::post('/judicial', [\App\Http\Controllers\api\JudicialPrecedentHighlightController::class, 'create']);
|
||||||
|
Route::put('/judicial/{id}', [\App\Http\Controllers\api\JudicialPrecedentHighlightController::class, 'update']);
|
||||||
|
Route::delete('/judicial/{id}', [\App\Http\Controllers\api\JudicialPrecedentHighlightController::class, 'destroy']);
|
||||||
|
|
||||||
|
// Legal Opinions
|
||||||
|
Route::post('/opinion', [\App\Http\Controllers\api\LegalOpinionHighlightController::class, 'create']);
|
||||||
|
Route::put('/opinion/{id}', [\App\Http\Controllers\api\LegalOpinionHighlightController::class, 'update']);
|
||||||
|
Route::delete('/opinion/{id}', [\App\Http\Controllers\api\LegalOpinionHighlightController::class, 'destroy']);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user