I installed Laravel-4 on my MAC, its all good until i try to do something.
I tried to follow the tutorial on website, which is the basic route here http://laravel.com/docs/quick
When i tried to open, its an error with message: Class Route not found on routes.php
I barely use framework PHP, so should i make a class for it or what do they want?
Is there another way to test that i could use the Laravel-4 php , like the hello-world ?
Related
I've recently updated my app from Laravel 5.1 to 5.3.
Soon after this, I tried installing chatter.
I followed the instructions, found here: https://github.com/thedevdojo/chatter
After following all the steps, I ran into a few problems, due to having my own user model/user auth system. But I changed things up chatter's config file, and now the forum loads fine (albeit with a few styling errors due to my main css file overriding somethings, but that's a minor issue).
The problem is that, when I try to post a new thread/discussion, I receive the following error:
which is referencing this line in ChatterDiscussionController.php:
and this line in ChatterBeforeNewDiscussion.php:
Could someone a bit more knowledgeable tell me what's going on here?
Please open up vendor/devdojo/src/Events/ChatterBeforeNewDiscussion.php and change
use Illuminate\Validation\Validator;
to
use Illuminate\Support\Facades\Validator;
I will make sure to fix this in the source for the Laravel Chatter Application.
I've got the manual in front of me, I've searched Google, and nothing. Why is this:
//update combined results cache
$schedule->call('App\Http\Controllers\CombinedYieldUpdater#index')
->everyFiveMinutes()
->between('02:00', '04:00');
causing this?
[2017-01-09 11:42:02] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Console\Scheduling\CallbackEvent::between()
It looks like you don't use Laravel 5.3. Similar problem here where user wanted to use method available in Laravel 5.2. and he was using 5.1.
Are you sure you using 5.3? If not update your framework to 5.3 and it should work.
im using behat to test my symfony2 projects specifically a test project i have to be a sandbox for my bundles.
One of the bundles to test is my FacebookBundle that integrate facebook api into symfony2 projects. This bundle provide several twig extensions. In the authenticate url of the bundles project i use one of this twig extensions to render the facebook login url but when i test it with behat i get this error:
An exception has been thrown during the rendering of a template ("Notice: Undefined index: HTTP_HOST in /var/www/vendor/facebook/php-sdk/src/base_facebook.php line 1187") in TestBundle:Default:auth.html.twig at line 13.
But i dont see any reason why this is happening, the project work just fine but testing with behat faild.
Any help, thanks
EDIT
Extrange im testing this project on travis and there all behat test pass, see travis: travis-ci.org/bitgandtter/bundles/jobs/37200512
EDIT2
It seams only happend with symfony2 driver for mink, i chage to goutte and work just fine, i review the code and symfony2 driver extend from mink-browse-kit driver, it will be nice to have some configuration options over it, i will keep digging to find the issue
I am learning Laravel. With composer i included the mobile-detect-bundle in the installation (files are in the folders). When i use the code as stated in the docs on github
$mobileDetector = $this->get('mobile_detect.mobile_detector');
i get this error:
**ErrorException**
File does not exist at path mobile_detect.mobile_detector (View: ) (View: )
I use this in my blade view and i think i have to set the path of 'mobile_detect.mobile_detector' but i have no clue what it has to be. Maybe one can give me a push in the right direction?
The reason it's not working is because you are trying to use a Symfony 2 bundle inside Laravel right out of the box.
As the github page says:
Symfony2 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
Basically, the line that you are trying to run is the way that you use services inside Symfony. It will work if you are in a Symfony application, but not inside Laravel.
// Get the mobile_detect.mobile_detector
// service from Symfony's service container
$mobileDetector = $this->get('mobile_detect.mobile_detector');
Although there might be some way to make it work, I'd sugggest to search in packagist for a Laravel specific package, or a PHP generic one that provides the same functionality, to make your life easier.
I've made a search and found this one, which is based in Mobile Detect too:
https://github.com/jenssegers/Laravel-Agent
When I was creating projects in Symfony2 on Windows there were no problems, but now (linux) I got something like this:
when I want to generate bundle without any parameters I get
[RuntimeException]
The "namespace" option must be provided.
When I type in the namespace I get:
[RuntimeException]
The "dir" option must be provided.
I can create bundle only if I give all the necessary arguments at the beginning and I'm kinda lazy person and it's quite annoying for me that console doesn't ask about namespace or anything. Is there any chance to repair this?:P
EDIT: actually this happens whenever I try to run function which requires arguments.
I've tried too to create a bundle with Netbeans or Eclipse but i have encountered the same problem.
The unique solution is to create your bundle with the Terminal.
All the process will run normally, and you'll only to answer the questions for finish your creation.
I'll come back to you if i've other solutions.
Cordially.
your problem doesn't come from netbeans, I use phpstorm and I had the same problem.
later I found out that the problem comes from symfony to solve it go to your project folder for me it was like:
/opt/lampp/htdocs/MyProject/vendor/symfony/symfony/src/Symfony/Component/console and open file Application.php in a text editor
search for
$input->setInteractive(false);
then comment it like this :
//$input->setInteractive(false);
it should perfectly work now !