本文整理汇总了PHP中app\Menu::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::all方法的具体用法?PHP Menu::all怎么用?PHP Menu::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Menu
的用法示例。
在下文中一共展示了Menu::all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
/**
* 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]);
}
示例2: get_menu
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);
}
示例3: search
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));
}
示例4: search
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));
}
示例5: index
/**
* 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');
}
}
示例6: search
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));
}
示例7: search
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));
}
示例8: getUserMenu
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);
}
示例9: create
/**
* 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'));
}
示例10: index
/**
* 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)]);
}
示例11: menuMain
public function menuMain()
{
$menus = Menu::all();
return view('Website.menu')->with('menus', $menus);
}
示例12: viewsend
public function viewsend()
{
$menus = Menu::all();
return view('emails.viewsend')->with(array('menus' => $this->menus, 'rolechucnangs' => $this->rolechucnangs));
}
示例13: getAll
/**
* Get all
* @return Collection
*/
public function getAll()
{
$menus = Menu::all();
return $menus;
}
示例14: search
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));
}
示例15: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index(Menu $menu)
{
$menus = $menu->all();
return view('admin.menus.menus', compact('menus'));
}