This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hey everyone. I'm new to the subreddit and I'm not sure whether I should be posting help requests here but the help flair was available and I didn't see anything in the rules against it so I'll give it a shot. So I'd like to begin by saying I'm totally new to Laravel and I have what I consider mediocre PHP skills but nonetheless, I find myself in a situation where I can't help but work on a Laravel project for the sake of my job. I've been working on this Laravel project for days now but I've always run into one problem or another. Most recently, I'm the victim of the following error:
I have to say, I haven't the slightest idea what is causing this problem. If I look at the aforementioned CustomController.php
, I find the following method at the bottom:
public static function getMenuAll() {
    $getMenuAll = DB::table('tb_landing_page_menu')->whereIn('id',[2,3])->get();
return $getMenuAll;
   Â
  }
Looking however into the problem file itself (that is menu.blade.php
), I find the offending lines of code:
<div class="visual container">
    {!! \App\Http\Controllers\CustomController::get_custom_info('homepage_visual_container') !!}
  </div>
<!-- bottom navigation -->
  <div class="bottom-nav">
    <ul>
      <li><a href="{{url('teach_course')}}">Teach a Course</a></li>
      u/foreach(\App\Http\Controllers\CustomController::getMenuAll() as $menu)
      u/if($menu->is_active == 2)
      u/if(\Auth::check())
      u/if(session()->get('gid') == 1 || session()->get('gid') ==2 || in_array(1,session()->get('gid')) || in_array(2,session()->get('gid')))
      <li><a class="" href="{{url($menu->url)}}" target="_blank">{{$menu->menu}}</a></li>
      u/else
      <li><a class="showPopMsg" href="#">{{$menu->menu}}</a></li>
      u/endif
      u/else
      <li><a class="showPopMsg" href="#">{{$menu->menu}}</a></li>
      u/endif
      u/else
      <li><a href="{{url($menu->url)}}" target="_blank">{{$menu->menu}}</a></li>
      u/endif
      u/endforeach
      <li><a href="http://thedailyspell.com" target="_blank">The Daily Spell</a></li>
      <li><a href="{{url('tos')}}">Terms of Services</a></li>
      <li><a href="{{url('sponsors')}}">Sponsors</a></li>
      <li><a href="{{url('faq')}}">FAQ</a></li>
      <li><a href="{{url('staff')}}">Staff</a></li>
    </ul>
  </div>
Given that the getMenuAll()
method clearly exists within the CustomController class, I do not have the slightest idea why the app is not registering this function. Or maybe, this isn't even the problem and I'm clearly more lost than I think I am. Any help or advice would be helpful. Thanks to anyone in advance who can point me in the right direction📷
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/laravel/com...