View [welcome] not found - php

I deployed my Laravel app (with Cloud SQL integration) onto Google App Engine with the following settings.
app.yaml
runtime: php73
env_variables:
LOG_CHANNEL: stackdriver
APP_LOG: errorlog
APP_KEY: [APP KEY]
APP_URL: "http://example.com/"
APP_STORAGE: /tmp
VIEW_COMPILED_PATH: /tmp
CACHE_DRIVER: database
SESSION_DRIVER: database
DB_DATABASE: cbt-sql
DB_USERNAME: root
DB_PASSWORD: [PASSWORD]
DB_SOCKET: "[SOCKET DETAILS]"
I ran the usual config/cache/view/route clear commands.
Using gcloud beta app deploy --no-cache, I got the following error:
View [welcome] not found.
However, looking at my codes directory, the view is clearly there.
What did I do wrong?
(1/1) InvalidArgumentException
View [welcome] not found.
in FileViewFinder.php line 137
at FileViewFinder->findInPaths('welcome', array('/workspace/resources/views'))
in FileViewFinder.php line 79
at FileViewFinder->find('welcome')
in Factory.php line 131
at Factory->make('welcome', array(), array())
in helpers.php line 975
at view('welcome')
in WelcomeController.php line 14
at WelcomeController->index()
at call_user_func_array(array(object(WelcomeController), 'index'), array())
in Controller.php line 54
at Controller->callAction('index', array())
in ControllerDispatcher.php line 45
at ControllerDispatcher->dispatch(object(Route), object(WelcomeController), 'index')
in Route.php line 219
at Route->runController()
in Route.php line 176
at Route->run()
in Router.php line 680
at Router->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php line 130
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in VerifyCsrfToken.php line 76
at VerifyCsrfToken->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in StartSession.php line 56
at StartSession->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 105
at Pipeline->then(object(Closure))
in Router.php line 682
at Router->runRouteWithinStack(object(Route), object(Request))
in Router.php line 657
at Router->runRoute(object(Request), object(Route))
in Router.php line 623
at Router->dispatchToRoute(object(Request))
in Router.php line 612
at Router->dispatch(object(Request))
in Kernel.php line 176
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
in Pipeline.php line 130
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in TransformsRequest.php line 21
at TransformsRequest->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in TransformsRequest.php line 21
at TransformsRequest->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in CheckForMaintenanceMode.php line 62
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in TrustProxies.php line 57
at TrustProxies->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 105
at Pipeline->then(object(Closure))
in Kernel.php line 151
at Kernel->sendRequestThroughRouter(object(Request))
in Kernel.php line 116
at Kernel->handle(object(Request))
in index.php line 59
[1]: https://i.stack.imgur.com/byOzf.png

FileViewFinder->findInPaths('welcome', array('/workspace/resources/views'))
Check your path

Related

Laravel InvalidArgumentException

hi all im having issue with a script i am helping a friend install
InvalidArgumentException in FileViewFinder.php line 137:
View [admin.cms] not found.
in FileViewFinder.php line 137
at FileViewFinder->findInPaths('admin.cms', array('/volume1/web/resources/views')) in FileViewFinder.php line 79
at FileViewFinder->find('admin.cms') in Factory.php line 174
at Factory->make('admin.cms', array('data' => ''), array()) in helpers.php line 858
at view('admin.cms', array('data' => '')) in CmsController.php line 70
at CmsController->dashboard()
at call_user_func_array(array(object(CmsController), 'dashboard'), array()) in Controller.php line 55
at Controller->callAction('dashboard', array()) in ControllerDispatcher.php line 44
at ControllerDispatcher->dispatch(object(Route), object(CmsController), 'dashboard') in Route.php line 189
at Route->runController() in Route.php line 144
at Route->run(object(Request)) in Router.php line 653
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfNotCms.php line 24
at RedirectIfNotCms->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckLanguage.php line 27
at CheckLanguage->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 43
at Authenticate->handle(object(Request), object(Closure), 'cms') in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 655
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 629
at Router->dispatchToRoute(object(Request)) in Router.php line 607
at Router->dispatch(object(Request)) in Kernel.php line 268
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Debugbar.php line 51
at Debugbar->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 150
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117
at Kernel->handle(object(Request)) in index.php line 53
at fileviewfinder.php 137
protected function findInPaths($name, $paths)
{
foreach ((array) $paths as $path) {
foreach ($this->getPossibleViewFiles($name) as $file) {
if ($this->files->exists($viewPath = $path.'/'.$file)) {
return $viewPath;
}
}
}
throw new InvalidArgumentException("View [$name] not found.");
}
/**
Im not sure what issue is i have checked that the paths are correct.
any help or a point in direction would be greatly appreciated
Server is Running Apache 2.4 and php version 7.2 Im not sure what issue is i have checked that the paths are correct.
any help or a point in direction would be greatly appreciated
Server is Running Apache 2.4 and php version 7.2
Make sure that your view file is in resources folder, and it got .blade.php as extension.
you can do this as well dd(view()->exists($yourview)); it should return true if the view exists, false if not.
Start from there and you will get to the solution.

Laravel Hesto multi-auth NotFoundHttpException

I use Hesto multi-auth to make multiple authentication. I made controllers, routes and others, but when I try open url e.g. localhost:8000/student/register it throws NotFoundHttpException.
This is example of route
Route::group(['domain' => 'student.' . env('APP_DOMAIN')], function () {
Route::get('/login', 'StudentAuth\LoginController#showLoginForm');
Route::post('/login', 'StudentAuth\LoginController#login');
Route::post('/logout', 'StudentAuth\LoginController#logout');
Route::get('/register', 'StudentAuth\RegisterController#showRegistrationForm');
Route::post('/register', 'StudentAuth\RegisterController#register');
Route::post('/password/email', 'StudentAuth\ForgotPasswordController#sendResetLinkEmail');
Route::post('/password/reset', 'StudentAuth\ResetPasswordController#reset');
Route::get('/password/reset', 'StudentAuth\ForgotPasswordController#showLinkRequestForm');
Route::get('/password/reset/{token}', 'StudentAuth\ResetPasswordController#showResetForm');
});
And this is exception
in RouteCollection.php line 179
at RouteCollection->match(object(Request)) in Router.php line 533
at Router->findRoute(object(Request)) in Router.php line 512
at Router->dispatchToRoute(object(Request)) in Router.php line 498
at Router->dispatch(object(Request)) in Kernel.php line 174
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53
at require_once('F:\\Studia\\Sem 3 mgr\\Praca magisterska\\thesis_system\\public\\index.php') in server.php line 21
It looks like you have only defined path for /register on a domain student.<your-app-domain>, but in your request the domain is localhost and the path is /student/register, so it does not match any of the path definitions.

Trying to get property of non-object laravel bogardo/mailgun/src/http/response

This error appears when I try to send email with mailgun package for laravel (bogardo/mailgun).
Route:
Route::post('mail-list/send/{type}/{id}', ['uses' => 'MailingList\MailingListController#sendSiteNews', 'as' => 'mail-list.send']);
Controller MailingListController
use Bogardo\Mailgun\Mail\Message;
use Mailgun;
Controller method:
public function sendSiteNews($type, $id) {
$data = [];
Mailgun::send('email.batch-news', $data, function (Message $message) {
$message->to('foo#example.com', 'John Smith')->subject('Welcome!');
});
];
At first I've tried batch sending. Result was the same. After that I've tried to send simple message like above.
view email.batch-news contains only text with h1 tag.
Error message:
ErrorException in Response.php line 35:
Trying to get property of non-object
in Response.php line 35
at HandleExceptions->handleError(8, 'Trying to get property of non-object', 'D:\\wamp\\www\\asiacrochet\\vendor\\bogardo\\mailgun\\src\\Http\\Response.php', 35, array('response' => object(stdClass))) in Response.php line 35
at Response->__construct(object(stdClass)) in Mailer.php line 68
at Mailer->send('email.batch-news', array(), object(Closure)) in Service.php line 59
at Service->send('email.batch-news', array(), object(Closure)) in Facade.php line 221
at Facade::__callStatic('send', array('email.batch-news', array(), object(Closure))) in MailingListController.php line 67
at MailingListController->sendSiteNews('Lesson', '10')
at call_user_func_array(array(object(MailingListController), 'sendSiteNews'), array('Lesson', '10')) in Controller.php line 55
at Controller->callAction('sendSiteNews', array('Lesson', '10')) in ControllerDispatcher.php line 44
at ControllerDispatcher->dispatch(object(Route), object(MailingListController), 'sendSiteNews') in Route.php line 203
at Route->runController() in Route.php line 160
at Route->run() in Router.php line 559
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in HasRole.php line 24
at HasRole->handle(object(Request), object(Closure), 'administrator') in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 43
at Authenticate->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 561
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 520
at Router->dispatchToRoute(object(Request)) in Router.php line 498
at Router->dispatch(object(Request)) in Kernel.php line 174
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 47
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53
That is method of package:
public function __construct(stdClass $response)
{dd($response->http_response_body);
$this->status = $response->http_response_code;
$this->message = $response->http_response_body->message;
$this->id = property_exists($response->http_response_body, 'id') ? $response->http_response_body->id : '';
$this->data = null;
}
dd($response->http_response_body);
gives only that string value "Mailgun Magnificent API".
So that is the problem.
Check your send-domain "email.batch-news". If this is incorrect mailgun, does identify the API method you are calling.

Error with Laravel file system after moving to new domain and hosting

So i have just run php composer.phar remove and the php composer.phar install and then artisan migrate after moving my site from one domain to another and changing database. This all went ok and no error appeared that i wasnt able to quickly fix that why i ran the composer remove. However im getting a weird cant find file error which i havent had before. I am not sure how to fix this or where i am going wrong. This is the error I am getting:
ErrorException in Filesystem.php line 109:
file_put_contents(/dfb46d0b690f78222831518b7c4c56c1dcef9f3b.php): failed to open stream: Permission denied
in Filesystem.php line 109
at HandleExceptions->handleError('2', 'file_put_contents(/dfb46d0b690f78222831518b7c4c56c1dcef9f3b.php): failed to open stream: Permission denied', '/home/danielma/public_html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', '109', array('path' => '/dfb46d0b690f78222831518b7c4c56c1dcef9f3b.php', 'contents' => '<?php $__env->startSection('content'); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('templates.' . $config->currentTemplate . '.standardLayouts.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>', 'lock' => false))
at file_put_contents('/dfb46d0b690f78222831518b7c4c56c1dcef9f3b.php', '<?php $__env->startSection('content'); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('templates.' . $config->currentTemplate . '.standardLayouts.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>', '0') in Filesystem.php line 109
at Filesystem->put('/dfb46d0b690f78222831518b7c4c56c1dcef9f3b.php', '<?php $__env->startSection('content'); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('templates.' . $config->currentTemplate . '.standardLayouts.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>') in BladeCompiler.php line 116
at BladeCompiler->compile('/home/danielma/public_html/resources/views/welcome.blade.php') in CompilerEngine.php line 51
at CompilerEngine->get('/home/danielma/public_html/resources/views/welcome.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'config' => object(stdClass))) in View.php line 149
at View->getContents() in View.php line 120
at View->renderContents() in View.php line 85
at View->render() in Response.php line 53
at Response->setContent(object(View)) in Response.php line 201
at Response->__construct(object(View)) in Router.php line 1085
at Router->prepareResponse(object(Request), object(View)) in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack(object(MainController), object(Route), object(Request), 'homePage') in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\MainController', 'homePage') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 724
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 726
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 53
at require_once('/home/danielma/public_html/public/index.php') in index.php line 21
I am not sure where i have gone wrong so help would be greatly appreciated.
These are my current php setting: http://imgur.com/Yuv9UO4
Make sure the storage and bootstrap/cache folders have write permissions.
If you still get the error afterwards run php artisan view:clear and php artisan cache:clear.
From the docs under Installation > Configuration > Directory Permissions:
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run.
Also check to make sure your .env file is correct.

Laravel 5 Routing Issue - Bad Method Call Exception

I'm attempting to simply send a 'PUT' request to one of my routes (which is called as a resource in the route file), yet I recieve this traceback as the response.
Whoops, looks like something went wrong.
1/1 BadMethodCallException in Controller.php line 273: Method [show] does not exist.
in Controller.php line 273
at Controller->__call('show', array('1'))
at AccountControllerV2->show('1')
at call_user_func_array(array(object(AccountControllerV2), 'show'), array('account' => '1')) in Controller.php line 246
at Controller->callAction('show', array('account' => '1')) in ControllerDispatcher.php line 162
at ControllerDispatcher->call(object(AccountControllerV2), object(Route), 'show') in ControllerDispatcher.php line 107
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 108
at ControllerDispatcher->callWithinStack(object(AccountControllerV2), object(Route), object(Request), 'show') in ControllerDispatcher.php line 67
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\API\V2\AccountControllerV2', 'show') in Route.php line 198
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 131
at Route->run(object(Request)) in Router.php line 692
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Authenticate.php line 47
at Authenticate->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Router.php line 694
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 661
at Router->dispatchToRoute(object(Request)) in Router.php line 619
at Router->dispatch(object(Request)) in Kernel.php line 214
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in HttpsProtocol.php line 15
at HttpsProtocol->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 55
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 61
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 40
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 42
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Kernel.php line 115
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53
I cannot for the life of me figure out why this is happening.
Here is a code snippet from the Controller itself (which extends BaseController):
/**
* Update the currently logged User in storage.
*
* #return Response 201
* #return jsonArray account
* #return string message
*/
public function update($account_id) {
$input = Input::all();
$message = 'Account Successfully Updated';
$user = Auth::User();
And here is the Route declaration:
Route::group(array('prefix' => 'api/v2', 'namespace' => 'API\V2', 'middleware' => 'auth'), function()
{
Route::resource('challenges', 'ChallengeControllerV2', ['only'=> ['index','store','update','destroy']]);
Route::resource('groups', 'GroupControllerV2');
Route::resource('account', 'AccountControllerV2');
The call is being made to the correct path. Any ideas why I'm getting what seems to be an illogical response? There is no additional middleware/filters attached to the controller than what is shown.
It turns out that in Laravel 5 if you do not specify the resources available on a Route it will assume that they are all there (unlike in Laravel 4 where it checks to see what resources are available in all controllers). So I had to change the line like so.
Route::resource('account', 'AccountControllerV2', ['only'=> ['index','update','destroy']]);

Categories