mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
fixBankInSlip
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?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 = new Marking;
|
||||
$marking->marking = strtoupper($request->input('marking'));
|
||||
$marking->email = $request->input('email');
|
||||
$marking->save();
|
||||
|
||||
return response()->json($marking, 201);
|
||||
}
|
||||
|
||||
public function update(Request $request, Marking $marking)
|
||||
{
|
||||
// TODO : update to upper case
|
||||
$marking->update($request->all());
|
||||
|
||||
return response()->json($marking, 200);
|
||||
}
|
||||
|
||||
public function delete(Marking $marking)
|
||||
{
|
||||
$marking->delete();
|
||||
|
||||
return response()->json(null, 204);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user