I have installed Lavarel on my ubuntu system by going through this link. After all the steps I can see the laravel default page(You have arrived). I came to know about the laravel command tool. So inside laravel folder from command tool(terminal) I tried
php artisan serve
and it showed me like this
Laravel development server started on http://localhost:8000
Directory does not exist.
When I used http://localhost:8000 from the browser it showed me like This webpage is not available. So can someone tell me how to solve this? Any help and suggestions will be really appreciable. Thanks
This is caused when Laravel cannot find public/index.php. You might need to update boostrap/paths.php to reflect your current public path.
In bootstrap/paths.php, change
'public' => __DIR__.'/public',
to
'public' => __DIR__.'/../',
*(Assuming there's a good reason for butchering the base install, such as deploying on IIS)
Reinstall it and skip the part when you remove public folder. It's a good security feature to have your public folder separated from your application code.
Related
I set up laravel Nova locally last night, tested it, used it, everything works great on my local machine.
Uploaded it to the server, and everything works great except when i head to /nova which rightfully redirects me to /nova/login but then presents me with this error
The Mix manifest does not exist. (View: /home/loanappboi/nova/resources/views/auth/layout.blade.php)
i'm using shared hosting, and i uploaded the files to the root, and uploaded the public folder content, into public_html (i did the necessary file updates to reflect this change)
What could be the cause of this?
i need help
I got this same error. Running php artisan nova:publish fixed it for me. You need to have the nova resources generated.
mix() helper function use /public/manifest-json.js
Set it in config
mix.setPublicPath('public_html/')
OR
use link to public
ln -s ./public ./public_html
For Apache Options FollowSymLinks
Make sure that you are adding '/vendor' in your .gitignore and not 'vendor'. Adding just 'vendor' will ignore all folders named vendor in your codebase and nova resources are in the vendor folder in public folder.
Currently my directory is var/www/
but i have other projects in this directory .for example:
var/www/wordpress/
laravel tell me :
Sorry, the page you are looking for could not be found.
how can change laravel directory to var/www/cms ?
does work another project?
how can do that?
I commented earlier .. But I think to make the comment more clear I am going to go ahead and answer this:
First what you need to do is cd into /var/www/cms
Next you need to create your Laravel application. While in the cms directory, issue your Laravel creation command IE composer create-project laravel/laravel your-project-name. Once it is finished .. You should have a directory in the cms directory named whatever you named your Laravel Project IE var/www/cms/your-project-name.
You then need to point your hosts file (whether Nginx or Apache) to the directory var/www/cms/your-project-name for whatever domain.
I hope this was simplified enough for you, and good luck!
Laravel Valet could be one of the Solution.
You could create seperate Host for your Specific Application at Localhost.
Explained here : https://stackoverflow.com/questions/19425086/alias-hostname-for-localhost
You could Create new Directory and run your Laravel Project there too.
I am trying to use Xethron/migrations-generator in a Laravel 5.4 project in order to generate migration files for all of the tables in my database. I followed the instructions in the README file for Laravel 5 to the letter. After resolving a complaint or two (had to install php7.0-xml extension), I try to run it but it spits out an error like so:
$ php artisan migrate:generate
Using connection: mysql
Generating migrations for: group_product_assoc, groups, product_hierarchy_assoc, product_product_assoc, products, replist, sessionsOLD, stores, tree, users, zipcode_coordinates
Do you want to log these migrations in the migrations table? [Y/n] :
> n
Setting up Tables and Index Migrations
[Way\Generators\Filesystem\FileNotFound]
/var/www/my-project/vendor/way/generators/src/Way/Generators/templates/migration.txt
I have reported this issue to Xethron on github and apparently I'm not the only person having this problem.
Can anyone tell me how to get this working? I'm not especially fluent with Laravel or Composer so please don't skimp on the basic explanations. I'm using:
Ubuntu 16.04
PHP 7.0.15
Laravel 5.4
I had the same issue. You need to copy the following file to the location:
https://github.com/Xethron/Laravel-4-Generators/tree/master/src/Way/Generators/templates/migration.txt
In to this folder ( it's possible, this does not exist - so you can either create the folders OR change the configuration file (config.php) in vendor Xethron
/var/www/my-project/vendor/way/generators/src/Way/Generators/templates/
J. Doe's answer is essentially correct as far as I can tell. I am posting a more complete solution here to describe the exact steps I took to fix the issue.
Apparently, there's something wrong with the Xethron code in that it tries to refer to a PHP template file that is somehow not properly included/required by the Xethron package. My short-term solution seems to have worked. That solution is to first cd into the working directory:
cd /var/www/my-project
then create the directory where the file should be:
mkdir -p vendor/way/generators/src/Way/Generators/templates
then we put the template file in there in one of two ways. One way, as suggested by J. Doe is to download the file from github (https://raw.githubusercontent.com/Xethron/Laravel-4-Generators/master/src/Way/Generators/templates/migration.txt) and save it as migration.txt in the directory we just created above. Or you can cd into the working directory and execute this command:
curl https://raw.githubusercontent.com/Xethron/Laravel-4-Generators/master/src/Way/Generators/templates/migration.txt > vendor/way/generators/src/Way/Generators/templates/migration.txt
The other way is to copy the template file which is apparently in a subdirectory of the xethron package:
cp vendor/xethron/laravel-4-generators/src/Way/Generators/templates/migration.txt vendor/way/generators/src/Way/Generators/templates/migration.txt
Once the file exists in that location, You should be able to run the command again without a hitch:
php artisan migrate:generate
This issue has been resolved, simply run composer update to get the latest version.
Apologies for the inconvenience.
I know there is bunch of answer out there and none of them solved my problem. I am giving a try again in 2016 may be some one can help.
php artisan make:migration createxxxtable
don't show any error and it don't create the file
neither of these function output anything too.
php artisan list
php artisan help migrate
Its not new project. I had been working on this project earlier and it was working fine. Created bunch of migration.
I tried deleting everying inside vendor and do composer install and composer update still no luck.
I did tried command like dump-autoload , optimize , clear-compiled etc. too
Thanks
Ok found the solution. I don't know whats the reason. But it was because I was using url() helper in a custom config file i created in config folder. The config file and value of url and others works fine all across the website but it just break artisan command. I don't know why.
Removing that url() helper from my custom config file solved the problem.
Normally when this issue arises it's due to an error in your code. Check for these coporates
Could be a typo in your .env file
Could be a syntax error in your .env
Entering in wrong configuration(syntax error) in your config folder
can you please try php artisan does that open up the artisan commands?
If these doesn't show anything then check your path to project in console.
I'm trying to set up an existing site that was built using Laravel 4 on my server. I've gotten stuck at an error: Driver [file] not supported. It's throwing the error from Illuminate/Support/Manager.php.
I've tried using boilerplate Laravel files for the Manager.php file, as well as the SessionManager.php file, but it still won't work. I've also tried to figure out if file is registered as a driver, but when I try to insert the code for it, I get lost because of undeclared functions.
When I try to change the default session driver in app/config/session to anything else, it just throws other errors at me. Yet this is the same way the site was originally set up on its own server, so I don't understand why it isn't working. Can anyone help me out?
I was stuck in same problem, solved it. After changing any configuration config cache must be cleared using php artisan config:cache. Hope it helps.
What is your php version?
Try to clean the session dir
app/storage/sessions
then try to clean autoload file
cd [YOUR LARAVEL ROOT DIR]
composer dump-autoload
and update composer package to be sure vendor folder is ok
cd [YOUR LARAVEL ROOT DIR]
composer update