Added marking to admin home page

Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange into fix/marking

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
This commit is contained in:
Jack Goh
2018-07-08 10:53:24 +08:00
18 changed files with 313 additions and 30 deletions
@@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\SettingActiveBank;
class SettingActiveBankController extends Controller
{
public function index()
{
$active_bank_setting = SettingActiveBank::latest()->first();
return response()->json($active_bank_setting, 201);
}
public function update(Request $request)
{
if($active_bank_setting = SettingActiveBank::latest()->first())
$active_bank_setting->update($request->all());
else
$active_bank_setting = SettingActiveBank::create($request->all());
return response()->json($active_bank_setting, 200);
}
}