Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

0
Undefined Method Error Where Method Clearly Exists
Post Flair (click to view more posts with a particular flair)
Post Body

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:

https://preview.redd.it/0hr3alys7xf91.png?width=1238&format=png&auto=webp&v=enabled&s=72bfffd038e13264da5e4ffa6427e150944fd192

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📷

Author
Account Strength
50%
Account Age
2 years
Verified Email
Yes
Verified Flair
No
Total Karma
112
Link Karma
86
Comment Karma
26
Profile updated: 4 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago