New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid argument supplied for foreach() (View: /var/www/html/resources/views/vendor/forum/category/index.blade.php) #154
Comments
The Which version of Laravel are you using? |
laravel 5.2.* some fields are not created at time of migration ex: category_id,description,private ... why ? and one more thing **i have already users table in my db ** .so at migration time its showing error users table already exits |
Sorry, I can't reproduce the issue with Laravel 5.2 / laravel-forum ~3.0 / laravel-forum-frontend ~1.0. Is your setup completely fresh or is it an upgrade from an older Laravel or laravel-forum version? |
Nothing to do with this package. It doesn't create any user tables. |
setup completely fresh and Laravel 5.2 / laravel-forum ~3.0 / laravel-forum-frontend ~1.0 |
Ran into the exact same problem. Persists when I manually enter an initial category into the database. Laravel 5.4 / laravel-forum ~4.0 / laravel-forum-frontend ~1.0 |
The following gets popped into the laravel.log file when it happens: [2017-02-04 19:13:11] local.ERROR: ReflectionException: Class forum.api.auth does not exist in C:\git\seapowers\vendor\laravel\framework\src\Illuminate\Container\Container.php:681 |
I fixed the problem by explicitly adding your forum api middleware to the application's route middleware in the Kernel. You should probably make a note of that in your documentation. |
4.0 is supposed to register the middleware automatically from the service provider if the routing option is enabled (which it is by default). Seems like this might be a compatibility issue with Laravel 5.4. I'll test it soon. |
@watchwood same problem. Just found the error 'Class forum.api.auth does not exist'. What did you put in your Kernel exactly? |
|
@Riari It also appears that observers aren't working correctly in the stack that I have. Thread/Post counts aren't incrementing at all. edit: And it's not letting me delete threads out of the box, either. |
I have just pushed a few releases - one with the latest PRs, and one that fixes the Middleware issue in Laravel 5.4 (it's because the I could not reproduce the observer or thread deletion issues. For the latter, make sure your policy is set up to allow deleting (the policies are purposefully very restrictive by default). |
I just loaded the package today and had the same issue and solution as @watchwood. |
i followed bellow instructions
1.composer require riari/laravel-forum:~3.0
2.Then add the service provider to your config/app.php:
Riari\Forum\ForumServiceProvider::class,
3.composer require riari/laravel-forum-frontend:~1.0
Riari\Forum\Frontend\ForumFrontendServiceProvider::class,
4.php artisan vendor:publish
5.php artisan migrate
6.then click on mydomaiin.com/forum
i got a this error
Invalid argument supplied for foreach() (View: /var/www/html/resources/views/vendor/forum/category/index.blade.php)
in Category_controller you guys are mention columns name 'category_id ' but in db table only 'id ' column there .any reason for that ?
The text was updated successfully, but these errors were encountered: