i'm quite new with laravel and composer. I've made a project previously and that works like a expected. Now i've started a brand new project 'bloemenn' in phpstorm choose composer project for type and installed laravel. When i run the project i see the welcome page of laravel. So far so good
But now i'm trying to make a controller with the command line tool but every command i execute points to my very first directory project i ever made.
So the controls are made but in the wrong directory.
so when i execute following command in phpstorm for project bloemenn:
Artisan make:controller indexController
i get following result:
/Applications/MAMP/bin/php/php5.6.7/bin/php /Users/u-123/project-test/laravel/artisan make: indexController
so the controller is made in project laravel instead of directory of project bloemenn
Anyone have any idea how i can fix this, i have this issue for every new composer project i start up?
ok,
found it myself
under preferences->Tools->Command Line Tools Support can you specify witch to uses
mine all pointed to my first project
Related
I'm trying to work with Laravel 5 on NetBeans.
Now, I'm trying to var_dump through Laravel 5 to understand how the application works, and I keep getting 500 errors when I have even a simple syntax error in my code, and it doesn't output the error log like normally. From what I understand by research is that it's caused by Laravel not being able to write into /storage/ folder in Laravel.
I created a new group netbeans and added www-data user to it, so right now I'm trying to figure out how do you install it so that Laravel 5 and NetBeans could 'recognize' each other. Right now I have NetBeans installed with apt-get install, and now that I've changed the Laravel 5 project rights with:
chown -R www-data:netbeans laravel5/
Now I can't access Laravel's project files with NetBeans because of right issues. All this is sort of confusing to me, so my question is:
How do I properly setup NetBeans and Laravel so I could edit my Laravel project folders files and somehow have Laravel access /storage/ folder inside Laravel, so I would not see 500 error and a blank page on every syntax error I make?
P.S: I tried to be as precise and explanatory as I could be
Check write permissions on storage folder!
Try:
sudo chmod -R 777 storage/
(i known that 777 is a bad thing to do, only do this to test).
After reading enter link description here it could also be a problem of permissions to write to the log folder. See the last comment from shiny
I copied all the source code of the project (Laravel 5) to another folder under htdocs folder.
The original project is running successfully.
But the destination project has this error:
NotFoundHttpException in RouteCollection.php line 145
in RouteCollection.php line 145
at RouteCollection->match(object(Request)) in Router.php line 716
.....
Please help me figure it out.
Sorry about my English.
Well, I had a similar problem today, Although I don't know if there are better solutions out there. However, I had to re-install laravel5 with composer using the following command.
composer create-project laravel/laravel newprojectname --prefer-dist
One more thing, I also noticed that I was typing the directory location to my laravel project differently from the way I saved it locally on my development windows PC. That is I was accessing the file location like so
http://localhost/laravel/projectdirectoryname
instead of something like this:
http://localhost/laravel/ProjectDirectoryName/
In summary, I named my project directory on my local drive, in camel-case (upper-lowercase), like so; ProjectDirectoryName while, I was accessing the project in the browser, in all lowercase, like so; projectdirectoryname. Although, this may not be applicable on a linux-dev machine, because of its case-sensitive constrain. However, this is possible in a windows-dev machine
When trying to run php artisan migrate:make create_users_table I get the following output in Windows CMD:
{"error":{"type":"ErrorException","message":"require(C:\...\\localhost
\\sites\\makeitsnappy\\app\/filters.php): failed to open stream: No such file or
directory","file":"C:\\...\localhost\\sites\\makeitsnappy\\app\\start
\\global.php","line":83}}
I'm running Windows 8. Laravel 4 and installed Composer, also ran composer update in the project folder. Same error happens.
Edit: Loading the application webpage, I get:
require(C:\.../localhost\sites\makeitsnappy\app/filters.php): failed to open stream: No such file or directory
Also, there is no filter.php file.
How can I fix this problem?
Since Laravel4 the routes and filters are in two different files: routes.php and filters.php not like in Laravel3 where both lay in the same file.
Check if there is a filter.php file in you app/ folder.
The error occurs because the autoloader tries to load this file on application's startup to get the filters for the called route or global filters.
Running composer update won't help here because you only get the framework and it's dependencies via composer and it doesn't update your app/ folder.
did you do composer install? It downloads some important files. I think you missed this command!
composer install
Im developing a library hand in hand with a project I'm working on in L4 and I'm doing it in a Workbench as recommended. I have set the Service Providers etc and it works fine on my local machine. However when I pust to Pagodabox, the console gives me this:
Error Output: PHP Fatal error: Class 'Coderollers\Formidable\FormidableServiceProvider' not found in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 123
Clearly, for some reason, on Pagodabox it is looking for my service provider in the vendors folder rather than the workbench folder. Does anyone know why this might be?
For a workbench package to be loaded by Laravel it expects to find an autoload.php file within a vendor directory of your package. You'll need to run composer install from your workbench packages directory to install the package dependencies and have it dump an autoload file.
Once done Laravel will be able to detect and use your package.
I have been trying to follow this tutorial: Tutorial
I can't get past page 2. When I try to run the command:
php composer.phar create-project --repository-url="http://packages.zendframework.com" C:\wamp\www\zendTutorial
I get these messages:
[RuntimeException]...[Composer\Downloader\TransportException]<br>
The "http://packages.zendframework.com/packages.json" file could not be downloaded: failed to open stream: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
I enabled ssl_module in the Apache modules and php_openssl in PHP extensions and a runtime error window popped up which I didn't read because I thought I would restart the server and everything would be okay.
Then I found out I had to create a private/public key pair so I followed this tutorial: tutorial
But I realized I skipped the step where I have to download WSAS (the 3rd application to download just to get this pig to oink) to export my pk from the keystore and I decided to put on the brakes and ask "really?" Is there a shortcut I can take to bypass all this crap so I can start with the tutorial? I've been at this for the past 3 hours and I am so fed up - it's demoralizing.
Note Another way to install the ZendSkeletonApplication is to use github. Go to https://github.com/zendframework/ZendSkeletonApplication ...
Try it this way. Get git and clone the repository from
https://github.com/zendframework/ZendSkeletonApplication.git
To do this, change in console (cmd.exe) to your workspace and type
git clone https://github.com/zendframework/ZendSkeletonApplication.git
It should create a subfolder ZendSkeletonApplication with the skeleton application inside.
Later when you have your skeleton application project you can run composer as described in the tutorial to get the dependencies.