- add schema and endpoints to make follows relationship with customer and broker - show and update states of follow button on ui
20 lines
765 B
PHP
20 lines
765 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\CommentController;
|
|
use App\Http\Controllers\FollowController;
|
|
use App\Http\Controllers\Interaction\InteractionController;
|
|
use App\Http\Controllers\Interaction\ReportController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::post('/view/{deal}', [InteractionController::class, 'view'])
|
|
->middleware('throttle:30,1')
|
|
->name('view-deal');
|
|
|
|
Route::middleware('throttle:30,1')->group(function () {
|
|
Route::post('/report/{deal}', [ReportController::class, 'store'])->name('report-deal');
|
|
Route::delete('/report/{deal}', [ReportController::class, 'destroy']);
|
|
});
|
|
|
|
Route::apiResource('deals.comments', CommentController::class)->except(['update', 'edit', 'destroy']);
|
|
Route::post('/follow/{broker}', FollowController::class);
|