This seems to be a problem that occasionally appears in Laravel. I wrote a CRUD controller to use it, but after testing, I received an error InvalidArgumentException in FileViewFinder.php line 137: View [bookingcrud.index] not found . Here is my code:
routes.php:
Route::resource('bookingcrud', 'BookingsCrudController');
BookingsCrudController.php
use uasc\Http\Requests; use uasc\Http\Requests\CrudCreateRequest; use uasc\Http\Requests\CrudUpdateRequest; use uasc\Http\Controllers\Controller; use Auth; use DB; use Illuminate\Pagination\Paginator; use Illuminate\Http\Request; class BookingsCrudController extends Controller { public function index() { if (!Auth::check() || Auth::user()->authority < 1) { return redirect('/login'); } $raw = "select * from bookings"; $bookings = DB::select($raw); $paginatedBookings = new Paginator($bookings, 1); return view('bookingcrud.index')->with('bookings', $paginatedBookings); } }
And the view located in ~/laravel/resources/views/bookingcrud/index.blade.php Regardless of what is in this view, will it be markup from the working view or just the word โcheeseโ:
InvalidArgumentException in FileViewFinder.php line 140: View [bookingcrud.index] not found.
I tested the same view in a well-known working controller and got the same error, however I tested a well-known working view on the same CRUD controller and it worked. I also tried changing the view directory and renaming it, but I will get the same error if "View [bookingcrud.index]" changes accordingly. I made sure that the rights to the file and directories were filled in for testing.
From the first error I received, I upgraded to 5.1.1 from 5.0.26 (this is the version with which the error occurred for me) and performed an update for the composer. Also, looking at streams with the same error, I also ran the artisan config: clear command
I am developing Windows 8.1 with Homestead 2.0.17 deployed using Virtual Box.
Any help would be very helpful at this moment when she is doing my head.
source share