Perbaikan minor
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class SelfMemberinController extends Controller
|
||||
{
|
||||
@@ -12,9 +14,21 @@ class SelfMemberinController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
return view('apps.member.create');
|
||||
$jenis = $request->query('jenis');
|
||||
Log::info($jenis);
|
||||
|
||||
$tarifStiker = DB::table('tarif_stiker');
|
||||
|
||||
if ($jenis) {
|
||||
$tarifStiker->where('stasiunkerja_id', $jenis);
|
||||
}
|
||||
|
||||
$produk = $tarifStiker->get();
|
||||
Log::info($produk);
|
||||
|
||||
return view('apps.member.index', compact('produk'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,7 +60,13 @@ public function store(Request $request)
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
Log::info($id);
|
||||
$tarifStiker = DB::table('tarif_stiker')
|
||||
->where('stasiunkerja_id', $id)
|
||||
->orderby('tarif')
|
||||
->get();
|
||||
|
||||
return $tarifStiker;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user