If you have watched the Laracast titled "Ogres Are Like Middleware" then I've based this question off of that.
From Jeffrey's example, basically, I am wondering how do you use a filter to restrict one user from editing another user's article?
I had such a function built into my Laravel 4.2 filter, but now the following code doesn't work because the middleware file I created "RedirectIfWrongUser" won't recognize the $article = Articles::find($id) code statement I had previously used. The reason why it won't work is because the Articles:: class is apparently not being recognized from within the Middleware file I made ("RedirectIfWrongUser").
Any constructive guidance would be most appreciated.
You can answer this question on StackOverflow if you like, where I have include some code blocks: http://stackoverflow.com/questions/31867873/creating-a-laravel-5-1-middleware-that-can-access-my-model
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community