28 lines
704 B
PHP
28 lines
704 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Http;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use App\User;
|
|
|
|
class PerubatanController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
}
|
|
|
|
public function index(){
|
|
$api_url = config('api.url');
|
|
$auth_user = Auth::user();
|
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
|
|
|
$paginate = User::paginate(5);
|
|
|
|
return view('operasi.perubatan.index',compact('cawangan_info','api_url','auth_user','paginate'));
|
|
|
|
}
|
|
}
|