I'm trying to use FOSJsRoutingBundle in my symfony project.
It works perfectly in production mode, but in the dev mode I've got an error.
The problem is for this script link:
<script src="/lacapa/web/app_dev.php/js/routing?callback=fos.Router.setData"></script>
When I click on the link, I can see an error page which say:
Whoops, looks like something went wrong. Call to a member function
getUser() on null in UserCreatedListener.php
I don't understand why I get that.
The FOSJsRoutingBundle is not compatible with Symfony3+ currently.
Related
I have a laravel + Vue.js project template downloaded from Creative Tim. Its login and register is not proceeding, giving the catch error whereas in the template demo its working fine. I think so the instructions said to write the VUE_APP_API_BASE_URL in Vue .env file and I didn't wrote it correct. Can anyone pls tell me how can I locate the exact address and what syntax it would be?
Since you are using vue with laravel, you need to prefix MIX_ before the variable. Eg:
MIX_VUE_APP_API_BASE_URL=http://localhost:8000
Here is the reference: https://laravel.com/docs/8.x/mix#environment-variables
I'm developing a Laravel 8.x app in the current version of VS Code. I have a dump() statement in a Controller that I've written so that I can determine precisely what's in the $request that is being handled because I suspect that my date isn't exactly what I think it is. I've added this to the store() method: $request->dump() and I'm pretty sure it has executed but I can't find the output from the dump() function anywhere. I've got Debugbar installed and it does not show the dump() output. Ditto for any window of the browser like the console, inspector, etc. I've looked in the laravel.log but it's not there either. I've checked each of my terminal windows - the ones dedicated to php artisan serve and npm run watch and the one I use for all other commands but I can't find anything there. I'm out of ideas on where to look.
If the Laravel docs tell you where to find the output, I missed it; they describe what dump() and dd() do but I can't find where they describe where the output is written.
I'm pretty new to Laravel and I'm working alone so I have no work colleagues to ask. Could someone kindly tell me where to find the output of dump() so that I can debug this program?
None of the comments pointed me to precisely where I eventually found the dd() output so I'm posting it here for the sake of any future person who has the same issue. I finally found it in the browser, in the console tab (I'm using Firefox) and within the Response to the Axios statement that tried to write the new record to the database. Here's a picture:
I had assumed that the information wouldn't require me to drill down as far as I did; I thought it would be as visible as normal console.log() output.
I'm very grateful to those who replied to my question; you finally got me looking in the exact right place. I've never used dd() or dump() before, even in vanilla PHP, so I really had no idea where the output got written.
Can someone help real quick. I'm trying to test something with Vue instance in console, but in console when I write $vm0 or $vm0.$children
Uncaught ReferenceError: $vm0 is not definedat :1:1
This only works if you have vue dev tools installed. Make sure you select the component first. It should look something like this:
Then you can inspect it in the console tab of chrome dev tools.
The question was initially asked for Vue2 I suppose, where you could use
$vm0.$route.query
to get access to various objects on the $vm0 Vue instance, here: router queries.
In Vue3, that one has changed in favor of
$vm0.proxy.$route.query
When I try to open any panel in DebugKit, CakePHP logo just keeps spinning and I can see there is an error in console. This is the error that I get :
Call to undefined method App\Controller\Component\MyComponent::configKey()
Which is strange because this component works totally fine and it doesn't show any errors when I use it in the application.
I figured out what was causing the error. My components name was Cookie and DebugKit plugin uses component with this name as well, so plugin was trying to call function configKey, which of course could not be found in my component.
How can I print the error message on browser where I access my app instead of seeing 'Whoops, looks like something went wrong.' which is not very helpful and is very annoying when I have to go to the storage/logs/lumen.log to find the error?
I am using Laravel's Lumen and it is not as friendly as Slim. Any ideas how can I see the error on screen instead?