/** * Show the form for creating a new resource. * * @return Response */ public function create() { $permisos = \App\Menu::all()->lists('nombre', 'id'); $nivel_usuario = \App\UserLevel::all()->lists('UserLevelName', 'UserLevelID'); /*array_unshift($nivel_usuario,'Seleccione un nivel de usuario');*/ array_unshift($permisos, 'Seleccione una opcion del menu'); return view('permisos.crear')->with(['permisos' => $permisos, 'userlevel' => $nivel_usuario]); }
public function get_menu() { $rekap = array(); $data = \App\Menu::all(); foreach ($data as $key) { $rekap[] = array('id' => $key->id, 'parentid' => $key->id_induk, 'text' => $key->nama, 'value' => $key->id); } echo json_encode($rekap); }
public function search(UserSearchIndexRequest $query) { $menus = Menu::all(); $querys = $query->input('query'); $users = User::where('username', 'LIKE', '%' . $querys . '%')->orWhere('email', 'LIKE', '%' . $querys . '%')->orWhere('name', 'LIKE', '%' . $querys . '%')->paginate(10); if ($users == NULL) { $users = 'Không Tìm Thấy'; } return view('user.index')->with(array('users' => $users, 'menus' => $menus)); }
public function search(canboSearchIndexRequest $query) { $menus = Menu::all(); $querys = $query->input('query'); $canbos = Canbo::where('name', 'LIKE', '%' . $querys . '%')->orWhere('fullname', 'LIKE', '%' . $querys . '%')->orderBy('name')->paginate(10); if ($canbos == NULL) { $canbos = 'Không Tìm Thấy'; } return view('canbo.index')->with(array('canbos' => $canbos, 'menus' => $this->menus)); }
/** * Display a listing of the resource. * * @return Response */ public function index() { if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Danhsach == 1) { $menus = Menu::all(); $roles = Role::all(); return view('role.index')->with(array('menus' => $this->menus, 'roles' => $roles, 'rolechucnangs' => $this->rolechucnangs)); } else { return \Redirect::to('/')->with('message-error', 'Không có quyền truy cập'); } }
public function search(DanhmucchuyendeSearchIndexRequest $query) { $menus = Menu::all(); $querys = $query->input('query'); $danhmucchuyendes = Danhmucchuyende::where('name', 'LIKE', '%' . $querys . '%')->orderBy('name')->paginate(10); if ($danhmucchuyendes == NULL) { $danhmucchuyendes = 'Không Tìm Thấy'; } return view('danhmucchuyende.index')->with(array('danhmucchuyendes' => $danhmucchuyendes, 'menus' => $this->menus)); }
public function search(CongviecSearchIndexRequest $query) { $menus = Menu::all(); $querys = $query->input('query'); $congviecs = \DB::table('congviecs')->join('tinhtrangcongviecs', 'tinhtrangcongviecs.id', '=', 'congviecs.tinhtrangcongviec_id')->join('danhmucnguonphatsinhs', 'danhmucnguonphatsinhs.id', '=', 'congviecs.nguonphatsinh_id')->select('congviecs.id', 'nguonphatsinh_id', 'socongvanden', 'ngayluu', 'noidungcongviec', 'canhanthuchien', 'ngaybatdau', 'thoigianthuchien', 'ngayketthuc', 'tinhtrangcongviec_id', 'mucdohoanthanh', 'chidaodanhgia', 'file_id', 'tinhtrangcongviecs.name as tinhtrangcongviec', 'danhmucnguonphatsinhs.name as nguonphatsinh')->where('socongvanden', 'LIKE', '%' . $querys . '%')->orWhere('noidungcongviec', 'LIKE', '%' . $querys . '%')->orWhere('canhanthuchien', 'LIKE', '%' . $querys . '%')->orWhere('mucdohoanthanh', 'LIKE', '%' . $querys . '%')->orWhere('lydokhonghoanthanh', 'LIKE', '%' . $querys . '%')->orWhere('chidaodanhgia', 'LIKE', '%' . $querys . '%')->paginate(10); if ($congviecs == NULL) { $congviecs = 'Không Tìm Thấy'; } return view('congviec.index')->with(array('congviecs' => $congviecs, 'menus' => $this->menus)); }
public function getUserMenu() { $user = Auth::user(); //获取当前登录用户 $all_menus = Menu::all(); $user_menus = []; foreach ($all_menus as $all_menu) { if ($user->can($all_menu->slug)) { $user_menus[$all_menu->id] = $all_menu->toArray(); } } return $this->dealMenu($user_menus, 1); }
/** * Show the form for creating a new resource. * * @return Response */ public function create(General $general, Request $request) { $theme = $general->theme(); $menu = Menu::find($request['menu']); $menus = null; if (!$menu) { $menus = Menu::all()->lists('name_en', 'id'); } $content = new Content(); $types = ['0' => '---']; foreach (ContentType::all()->lists('name', 'id') as $key => $value) { array_push($types, $value); } $theme['title'] = 'Create Content'; $theme['description'] = 'description for content creation'; $button_text = 'Create Content'; return view('admin.content.create', compact('theme', 'menu', 'menus', 'content', 'types', 'button_text')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // return view("wd.index")->withData(['menu' => Menu::all(), 'products' => $this->doSearchByCategory(WDConfig::PRODUCT_CATEGORY_JIEMIAN), 'wdInfo' => WdInfo::find(1)]); }
public function menuMain() { $menus = Menu::all(); return view('Website.menu')->with('menus', $menus); }
public function viewsend() { $menus = Menu::all(); return view('emails.viewsend')->with(array('menus' => $this->menus, 'rolechucnangs' => $this->rolechucnangs)); }
/** * Get all * @return Collection */ public function getAll() { $menus = Menu::all(); return $menus; }
public function search(CongvandiSearchIndexRequest $query) { $menus = Menu::all(); $querys = $query->input('query'); $congvandis = Congvandi::where('socongvandiso', 'LIKE', '%' . $querys . '%')->orWhere('socongvandichu', 'LIKE', '%' . $querys . '%')->orWhere('noiluu', 'LIKE', '%' . $querys . '%')->orWhere('trichyeucongvandi', 'LIKE', '%' . $querys . '%')->paginate(10); if ($congvandis == NULL) { $congvandis = 'Không Tìm Thấy'; } return view('congvandi.index')->with(array('congvandis' => $congvandis, 'menus' => $this->menus)); }
/** * Display a listing of the resource. * * @return Response */ public function index(Menu $menu) { $menus = $menu->all(); return view('admin.menus.menus', compact('menus')); }
function __construct() { self::$data['main_menu'] = !\Request::input('angular') ? Menu::all()->toJson() : null; }
public function index() { $menu = Menu::all(); return view("teabreak/menu/index", ['menu' => $menu->toArray()]); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { // return view("wd.admin.product.create")->withData(['pCategory' => Menu::all()]); }
/** * Bind data to the view. * * @param View $view * @return void */ public function compose(View $view) { $view->with('slidebar', Menu::all()); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Xem == 1) { $loaicongvans = Danhmucloaicongvan::get(array('id', 'name')); $capphathanhs = Danhmucnhomdonvi::get(array('id', 'name')); $noiphathanhs = Danhmucdonvi::get(array('id', 'name', 'danhmucnhomdonvi_id')); $mucdichs = Danhmucmucdich::get(array('id', 'name')); $linhvucchuyendes = Linhvucchuyende::get(array('id', 'name')); $chuyendes = Danhmucchuyende::get(array('id', 'name', 'linhvucchuyende_id')); $chutrixulys = Danhmucphong::get(array('id', 'name')); $phoihopxulys = Danhmucphong::get(array('id', 'name')); $canboxulys = Canbo::get(array('id', 'name')); $domats = Danhmucdomat::get(array('id', 'name')); $dokhans = Danhmucdokhan::get(array('id', 'name')); $menus = Menu::all(); $phongs = Danhmucphong::all(); $dois = Danhmucdoi::all(); $canbos = User::where('role_id', '>', 2)->get(); $congvanden = Congvanden::findOrFail($id); $getfiletralois = \DB::table('file_traloicongvandens')->where('congvanden_id', $id)->get(); $getcountups = \DB::table('file_traloicongvandens')->where('congvanden_id', $id)->distinct()->select('stt')->get(); $getusers = \DB::table('file_traloicongvandens')->where('congvanden_id', $id)->distinct()->select('user_id')->get(); return view('congvanden.show')->with(array('congvanden' => $congvanden, 'getcountups' => $getcountups, 'getfiletralois' => $getfiletralois, 'getusers' => $getusers, 'loaicongvans' => $loaicongvans, 'domats' => $domats, 'dokhans' => $dokhans, 'menus' => $this->menus, 'capphathanhs' => $capphathanhs, 'noiphathanhs' => $noiphathanhs, 'mucdichs' => $mucdichs, 'linhvucchuyendes' => $linhvucchuyendes, 'chuyendes' => $chuyendes, 'chutrixulys' => $chutrixulys, 'phoihopxulys' => $phoihopxulys, 'canboxulys' => $canboxulys, 'phongs' => $phongs, 'dois' => $dois, 'canbos' => $canbos)); } else { return \Redirect::route('congvanden.index')->with('message-error', 'Không có quyền truy cập'); } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $menus = Menu::all(); return view('menu.index', compact('menus')); }
public function showall(Request $request) { $menus = Menu::all(); $loaicongvans = Danhmucloaicongvan::get(array('id', 'name')); //$ngaynhanbatdau = $input['ngaynhanbatdau']; //$ngaynhanketthuc = $input['ngaynhanketthuc']; //$loaicongvanden = $input['loaicongvan']; $ngaynhanbatdau = $request->input('ngaynhanbatdau'); $ngaynhanketthuc = $request->input('ngaynhanketthuc'); $kiemngay = false; // khong chon ngay if ($ngaynhanbatdau != '' && $ngaynhanketthuc != '') { $ngaynhanbatdau = date('Y-m-d', strtotime(str_replace('/', '-', $ngaynhanbatdau))); //date('Y-m-d', strtotime(str_replace('/', '-', Input::get('ngayphathanh-start'))) ) ; $ngaynhanketthuc = date('Y-m-d', strtotime(str_replace('/', '-', $ngaynhanketthuc))); $kiemngay = true; } else { $kiemngay = false; } $loaicongvanden = $request->input('loaicongvan'); //var_dump($input); //echo $loaicongvanden; if ($loaicongvanden == 0) { if ($kiemngay) { $baocaocongvandens = \DB::table('congvandens')->where('ngaynhancongvan', '>=', $ngaynhanbatdau)->where('ngaynhancongvan', '<=', $ngaynhanketthuc)->select('*')->paginate(10); } else { $baocaocongvandens = \DB::table('congvandens')->select('*')->paginate(10); } } else { if ($kiemngay) { $baocaocongvandens = \DB::table('congvandens')->where('ngaynhancongvan', '>=', $ngaynhanbatdau)->where('ngaynhancongvan', '<=', $ngaynhanketthuc)->where('danhmucloaicongvan_id', '=', $loaicongvanden)->select('*')->paginate(10); } else { $baocaocongvandens = \DB::table('congvandens')->select('*')->paginate(10); } } //var_dump($baocaocongvandens); return view('thongkecongvanden.showall')->with(array('loaicongvans' => $loaicongvans, 'baocaocongvandens' => $baocaocongvandens, 'menus' => $this->menus)); }
public function resultnoisoanthaonguoiky(IncongvandiFormRequest $request) { $menus = Menu::all(); $ngaynhanbatdau = $request->input('ngaynhanbatdau'); $ngaynhanketthuc = $request->input('ngaynhanketthuc'); if ($ngaynhanbatdau != '' && $ngaynhanketthuc != '') { $ngaynhanbatdau = date('Y-m-d', strtotime(str_replace('/', '-', $ngaynhanbatdau))); //date('Y-m-d', strtotime(str_replace('/', '-', Input::get('ngayphathanh-start'))) ) ; $ngaynhanketthuc = date('Y-m-d', strtotime(str_replace('/', '-', $ngaynhanketthuc))); if ($ngaynhanbatdau > $ngaynhanketthuc) { return \Redirect::route('baocaocongvandi.noisoanthaonguoiky')->withErrors('Ngày nhận bắt đầu phải nhỏ hơn ngày nhận kết thúc!')->withInput(); } else { $congvandis = Congvandi::where('ngayphathanh', '>=', $ngaynhanbatdau)->where('ngayphathanh', '<=', $ngaynhanketthuc)->get(); } } //$tungay = '01/02/2015'; //$denngay = '01/06/2015'; $tungays = date('d/m/Y', strtotime($ngaynhanbatdau)); //date('Y-m-d', strtotime(str_replace('/', '-', Input::get('ngayphathanh-start'))) ) ; $denngays = date('d/m/Y', strtotime($ngaynhanketthuc)); //echo '<pre>'; //print_r($congvandis); return view('baocaocongvandi.noisoanthaonguoiky')->with(['menus' => $this->menus, 'tungay' => $tungays, 'denngay' => $denngays, 'congvandis' => $congvandis])->withInput($request); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ public function create(array $data) { $kop = new \App\Koperasi(); $kop->nama = "Koperasi Online"; $kop->alamat = "Jalan Condet Raya No. 9A"; $kop->email = "*****@*****.**"; $kop->no_telp = "083870002220"; $kop->no_fax = "083870002220"; $kop->denda = "0.05"; $kop->logo = "Logo-Koperasi.gif"; $kop->catatan = "Simpan baik baik dan setiap kali berhubungan dengan Koperasi Online"; $kop->rtrw = "04/04"; $kop->kel = "Balekambang"; $kop->kec = "Kramat Jati"; $kop->kabkota = "Jakarta Timur"; $kop->prov = "DKI Jakarta"; $kop->kodepos = "13530"; $kop->negara = "Indonesia"; $kop->created_by = 0; $kop->save(); $user = User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'assigned_koperasi' => $kop->id, 'primary' => 1, 'created_by' => 0]); $kop->created_by = $user->id; $kop->save(); if (sizeof(\App\Menu::all()) == 0) { $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Dashboard"; $menu->url = "/"; $menu->icon = "fa-dashboard"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Anggota"; $menu->url = ""; $menu->icon = "fa-user"; $menu->save(); $id_last = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Tambah Anggota"; $menu->url = "anggota/baru"; $menu->icon = "fa-user-plus"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Data Anggota"; $menu->url = "anggota"; $menu->icon = "fa-list"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Transaksi"; $menu->url = ""; $menu->icon = "fa-map-signs"; $menu->save(); $id_last = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Simpanan"; $menu->url = ""; $menu->icon = "fa-folder-open"; $menu->save(); $id_last2 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Tambah Simpanan"; $menu->url = "transaksi/simpanan/baru"; $menu->icon = "fa-plus"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Data Simpanan"; $menu->url = "transaksi/simpanan"; $menu->icon = "fa-list"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Pinjaman"; $menu->url = ""; $menu->icon = "fa-money"; $menu->save(); $id_last2 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Buat Pinjaman"; $menu->url = "transaksi/pinjaman/baru"; $menu->icon = "fa-plus"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Data Pinjaman"; $menu->url = "transaksi/pinjaman"; $menu->icon = "fa-list"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Angsuran"; $menu->url = ""; $menu->icon = "fa-pencil-square-o"; $menu->save(); $id_last2 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Pembayaran"; $menu->url = "transaksi/pembayaran/baru"; $menu->icon = "fa-plus"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Data Pembayaran"; $menu->url = "transaksi/pembayaran/all"; $menu->icon = "fa-list"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Keuangan"; $menu->url = ""; $menu->icon = "fa-money"; $menu->save(); $id_last = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Koreksi"; $menu->url = ""; $menu->icon = "fa-pencil"; $menu->save(); $id_last2 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Koperasi"; $menu->url = ""; $menu->icon = "fa-institution"; $menu->save(); $id_last3 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last3; $menu->nama = "Pemasukan Koperasi"; $menu->url = "keuangan/pemasukan/koreksi"; $menu->icon = "fa-sign-in"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last3; $menu->nama = "Pengeluaran Koperasi"; $menu->url = "keuangan/pengeluaran/koreksi"; $menu->icon = "fa-sign-out"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Anggota"; $menu->url = ""; $menu->icon = "fa-user"; $menu->save(); $id_last3 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last3; $menu->nama = "Pemasukan Anggota"; $menu->url = "keuangan/pemasukan/anggota"; $menu->icon = "fa-sign-in"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last3; $menu->nama = "Pengeluaran Anggota"; $menu->url = "keuangan/pengeluaran/anggota"; $menu->icon = "fa-sign-out"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last2; $menu->nama = "Tabungan"; $menu->url = ""; $menu->icon = "fa-credit-card"; $menu->save(); $id_last3 = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last3; $menu->nama = "Pemasukan Tabungan"; $menu->url = "keuangan/pemasukan/tabungan"; $menu->icon = "fa-sign-in"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last3; $menu->nama = "Pengeluaran Tabungan"; $menu->url = "keuangan/pengeluaran/tabungan"; $menu->icon = "fa-sign-out"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Rekap Keuangan"; $menu->url = "keuangan/rekap"; $menu->icon = "fa-server"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Laporan"; $menu->url = ""; $menu->icon = "fa-copy"; $menu->save(); $id_last = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Simpanan"; $menu->url = "laporan/simpanan"; $menu->icon = "fa-folder-open"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Pinjaman"; $menu->url = "laporan/pinjaman"; $menu->icon = "fa-money"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Cetak Bukti"; $menu->url = "transaksi/pembayaran/cetak_manual"; $menu->icon = "fa-print"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Saldo Koperasi"; $menu->url = "laporan/saldo"; $menu->icon = "fa-tachometer"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Preferensi"; $menu->url = ""; $menu->icon = "fa-cubes"; $menu->save(); $id_last = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Simpanan"; $menu->url = "preferensi/simpanan"; $menu->icon = "fa-folder-open"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Pinjaman"; $menu->url = "preferensi/pinjaman"; $menu->icon = "fa-money"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Denda"; $menu->url = "preferensi/denda"; $menu->icon = "fa-calendar-times-o"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Catatan Transaksi"; $menu->url = "preferensi/catatan"; $menu->icon = "fa-pencil"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Badan Hukum"; $menu->url = "preferensi/badan_hukum"; $menu->icon = "fa-institution"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = 0; $menu->nama = "Pengaturan"; $menu->url = ""; $menu->icon = "fa-cogs"; $menu->save(); $id_last = $menu->id; $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Koperasi"; $menu->url = "pengaturan/koperasi"; $menu->icon = "fa-institution"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Pengurus"; $menu->url = "pengaturan/pengurus"; $menu->icon = "fa-group"; $menu->save(); $menu = new \App\Menu(); $menu->id_induk = $id_last; $menu->nama = "Bantuan"; $menu->url = "bantuan"; $menu->icon = "fa-life-ring"; $menu->save(); //dst } if (sizeof(\App\Bulan::all()) != 12) { $bul = new \App\Bulan(); $bul->bulan = 1; $bul->nama = "Januari"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 2; $bul->nama = "Februari"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 3; $bul->nama = "Maret"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 4; $bul->nama = "April"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 5; $bul->nama = "Mei"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 6; $bul->nama = "Juni"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 7; $bul->nama = "Juli"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 8; $bul->nama = "Agustus"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 9; $bul->nama = "September"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 10; $bul->nama = "Oktober"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 11; $bul->nama = "November"; $bul->save(); $bul = new \App\Bulan(); $bul->bulan = 12; $bul->nama = "Desember"; $bul->save(); } $sim = new \App\Simpanan(); $sim->id_koperasi = $kop->id; $sim->no_transaksi = "KSP-{tanggal}-SP"; $sim->nama = "Simpanan Pokok"; $sim->jumlah = 1000000; $sim->created_by = $user->id; $sim->save(); $sim = new \App\Simpanan(); $sim->id_koperasi = $kop->id; $sim->no_transaksi = "KSP-{tanggal}{urutan}-SW"; $sim->nama = "Simpanan Wajib"; $sim->jumlah = 500000; $sim->created_by = $user->id; $sim->save(); $sim = new \App\Simpanan(); $sim->id_koperasi = $kop->id; $sim->no_transaksi = "KSP-{tanggal}{urutan}-SK"; $sim->nama = "Simpanan Sukarela"; $sim->jumlah = 0; $sim->created_by = $user->id; $sim->save(); $pin = new \App\Pinjaman(); $pin->id_koperasi = $kop->id; $pin->no_transaksi = "KSP-{tanggal}{urutan}-PM"; $pin->nama = "Pinjaman Manual"; $pin->jumlah = 0; $pin->jangka_waktu = 12; $pin->bunga = 5; $pin->created_by = $user->id; $pin->save(); $pin = new \App\Pinjaman(); $pin->id_koperasi = $kop->id; $pin->no_transaksi = "KSP-{tanggal}{urutan}-KB"; $pin->nama = "Kasbon"; $pin->jumlah = 0; $pin->jangka_waktu = 1; $pin->bunga = 5; $pin->created_by = $user->id; $pin->save(); $ang = new \App\Anggota(); $ang->id_koperasi = $kop->id; $ang->no_anggota = "KSP-00001-A"; $ang->nama = "Arief Setya"; $ang->email = "*****@*****.**"; $ang->no_telp = "083870002220"; $ang->no_hp = "083870002220"; $ang->no_ktp = "3175043103961004"; $ang->gender = "L"; $ang->alamat = "Jalan Condet Raya No. 9A"; $ang->rtrw = "04/04"; $ang->kel = "Balekambang"; $ang->kec = "Kramat Jati"; $ang->scan_ktp = "Logo-Koperasi.gif"; $ang->foto = "Logo-Koperasi.gif"; $ang->kabkota = "Jakarta Timur"; $ang->prov = "DKI Jakarta"; $ang->kodepos = "13530"; $ang->negara = "Indonesia"; $ang->created_by = $user->id; $ang->save(); $menu = \App\Menu::all(); foreach ($menu as $key) { $priv = new \App\Privileges(); $priv->id_koperasi = $kop->id; $priv->id_menu = $key['id']; $priv->id_users = $user->id; $priv->save(); } return User::find($user->id); }
/** * Sort the specified resource from storage. * * @return \Illuminate\Http\Response */ public function sort() { $input = \Input::get('menuItem'); $line = 1; foreach ($input as $id => $parent) { $menu = Menu::findOrFail($id); if ($parent == "null") { $menu->parent_id = NULL; } else { $menu->parent_id = $parent; } $menu->line = $line; $menu->save(); $line++; } $this->rebuild(); // slug making $menus = Menu::all(); foreach ($menus as $menu) { $this->recursive_slug($menu->id); $menu->slug = $this->slug; $menu->eng_slug != '/home' ? $menu->eng_slug = '/eng' . $this->eng_slug : null; $menu->save(); $this->slug = ""; $this->eng_slug = ""; } // anasayfa herzaman ilk sırada $home = Menu::where('slug', '/anasayfa')->first()->save(['line' => 0]); \Activity::log('Menü Sıralaması Değiştirildi'); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { $menus = Menu::all(); $roles = Role::all(); return view('permission.create')->with(array('menus' => $this->menus, 'roles' => $roles)); }
public function getMenu() { return Menu::all(); }
public function index() { $elements = Menu::all(); return view('welcome')->with('elements', $elements); }
public function orderProcess(Request $request) { $data['menu'] = Menu::all(); return view('userorder.select', $data); }