mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
41 lines
746 B
PHP
41 lines
746 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Marking;
|
|
|
|
class MarkingController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
return Marking::all();
|
|
}
|
|
|
|
public function show(Marking $marking)
|
|
{
|
|
return $marking;
|
|
}
|
|
|
|
public function store(Request $request)
|
|
{
|
|
$marking = Marking::create($request->all());
|
|
|
|
return response()->json($marking, 201);
|
|
}
|
|
|
|
public function update(Request $request, Marking $marking)
|
|
{
|
|
$marking->update($request->all());
|
|
|
|
return response()->json($marking, 200);
|
|
}
|
|
|
|
public function delete(Marking $marking)
|
|
{
|
|
$marking->delete();
|
|
|
|
return response()->json(null, 204);
|
|
}
|
|
}
|