mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 12:34:06 +00:00
added migration, model, and controller
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DeliveryInfoController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return Product::all();
|
||||
}
|
||||
|
||||
public function show(DeliveryInfo $deliveryinfo)
|
||||
{
|
||||
return $deliveryinfo;
|
||||
}
|
||||
|
||||
public function store(DeliveryInfo $deliveryinfo)
|
||||
{
|
||||
$deliveryinfo = DeliveryInfot::create($request->all());
|
||||
|
||||
return response()->json(DeliveryInfo, 201);
|
||||
}
|
||||
|
||||
public function delete(DeliveryInfo $deliveryinfo)
|
||||
{
|
||||
$deliveryinfo->delete();
|
||||
|
||||
return response()->json(null, 204);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user