Laravel 5 installation on Centos 7 issue - laravel

I successfully installed the latest Laravel framework on my Centos 7 VHost.
After the composer command was done installing it, I created a new Laravel project.
For that I went o /var/www/ and created a folder there called "great" , then I changed directory to enter it, so pwd showed me
/var/www/great/
Then I ran this command:
composer create-project laravel/laravel myproject
The last one, created (as expected) a new folder inside the "great" folder called "myproject"
According to the Laravel installation instructions, I changed my directory to be inside the myproject folder and when I run
php artisan -V
I get:
Laravel Framework version 5.0.16
then I ran the command
php artisan serve --host 192.168.1.60 --port 80
with 192.168.1.60 being my vhost's IP address. So i expect to be able to see the Laravel page from my other computer (windows) when I access the ip in my browser, but it's not happening. All I get in my browser is:
ERR_CONNECTION_TIMED_OUT
At first I tried it without specifying the host or the port... same result. Then I discovered that I need to specify the host in order to be able to access the project from locations other than localhost. So I tried accessing it by going for http://192.168.1.60:8000 (because that is it's default port). Same result.
I can ping the IP, on Centos side I do not get any error when I run the artisan serve....
What am I doing wrong?

Related

Laravel Telescope error "The Mix manifest does not exist

I'm having trouble running telescope in an environment with apache + php 8.1 on a centos 8 server.
i would not like to install node on this machine to fix the problem, i kept the same folder name for publishing "/var/www/public"
I tried using php artisan vendor:publish --tag=telescope-assets --force but was unsuccessful.
the same project on my local machine runs normally

Run Laravel phpMyAdmin via php artisan serve

I have a Laravel project running with php artisan serve (no Apache or Nginx) on:
http://localhost:8000/
I have then ran this successfully
composer require phpmyadmin/phpmyadmin
My question is, what additions to Laravel's routing etc. must I do to run the following?
http://localhost:8000/phpmyadmin
Though I haven't found a specific way to have
http://localhost:8000/phpmyadmin
working through Laravel as part of php artisan serve, there is a simple solution that works just fine using PHP's native server instead, assuming you have mysql installed as localhost:
composer create-project phpmyadmin/phpmyadmin
cd phpmyadmin
ls -la #files look like classic phpMyAdmin, note however `vendor` folder in place along with package.json
php -S http://localhost:7000 #and you should be able to see and log in!
This does everything I need it to do. If you want to install phpMyAdmin through an actual webserver like Apache that runs always, you're better off doing something like apt-get [or yum] install phpmyadmin and then you'll have a directory override from Apache running:
http://www.mylaravelapp.com/phpmyadmin

Homestead and Laravel basis understanding

I have some questions about the basis understanding about homestead and laravel.
I have set up my homestead with this guide: https://laravel.com/docs/5.2/homestead and it works ok.
1) But when I vagrant ssh into my box, I can call composer, but I can't call laravel or php artisan. Have I done something wrong/misunderstod something?
2) Do I need to install php and laravel locally, can't I just run it on my VM like i do now?
To call php artisan commands (after you ran vagrant ssh command) you need to have installed Laravel project and you need to be in project's root folder:
cd my-laravel-project
php artisan

Laravel installed but confusion remains

I have ubuntu 14.04 and LAMPP is installed. I was learning Laravel 4, but get a lot of confusion on it's documentation, below I list few of issue.
How to install laravel?
what I did :
copy github repository into /opt/lampp/htdocs/larva and run composer install, Laravel is installed and I can access it with http://localhost/larva
What is homestead? is that another way to install laravel or this is additional thing?
What is artisan? if I use artisan then do we need to use homestead also?
what I did ( in terminal )
cd /opt/lampp/htdocs/larva
php artisan serve
it started the service and I can access laravel with htpp://localhost:8000 BUT if i close this terminal then URL is lost
and there is one other way is using vagrant? do we need to use vagrant if we installed it already?
one more thing is Nginx?
overall these vagrant, Nginx, Homestead, artisan,and composer methods create such a mess.
Please clear the clouds and please do not mention what is vagrant Nginx and all. I just want to know that do I need to do something with Homestead and vagrant if i have installed using git repository and composer way?
Thanks
Laravel Homestead is an official, pre-packaged Vagrant "box" that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.
Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component.
When you close the terminal, you are stopping the service on port 8000. You always can create a virtual host, and point its root to your larval installation /public directory
you dont have to use vagrant to run laravel. Vagrant is just your 'bridge' to Virtual Mashine.
If you installed LAravel via composer and you got it work on localhost:8000 then you dont need neither homestead or vagrant

Install Laravel framework on WAMP

I have been trying to install Laravel framework on WAMP.
I been following the steps from http://laravel.com/
and Installing Laravel 4.1 in Windows 7 // Make .phar file globally available to windows command line
When i run the command
composer create-project laravel/laravel --prefer-dist , getting the error message
[RuntimeException]
You must enable the openssl extension to download files via https
But i have enabled openssl in php.ini by removing the comment sign.
Please help
If you are using WAMPServer here is the problem:
WAMPServer's PHP CLI ( Command Line Interface ) i.e. running php.exe from command line uses a different php.ini to the one used by PHP in Apache.
Edit \wamp\bin\php\php5.x.y\php.ini
Activate the extensions you require the PHP CLI to have access to in the usual way i.e. remove the comment ';' from the extension=php_xxxx.dll line.
Wamp uses 2 php.ini
first one that you changed from the Wamp panel and second one that located on Apache folder.
i think on the wamp/bin/apache/bin make sure to enable openssl on both and restart the Wamp.
This worked for me. Hope this helps you.
Install Laravel Framework in Windows *PHP version greater than
5.3.7 is required.
Download Laravel from: https://github.com/laravel/laravel/archive/master.zip.
Extract Laravel into the www folder for WAMP.
Download Composer from: https://getcomposer.org/Composer-Setup.exe
Enable openssl from all php.ini files
Install Composer into the same directory php.exe is located.
Click on WAMP icon->PHP->PHP Extensions and enable: php_openssl, php_curl, php_socket.
Click on wamp icon->Apache->Apache Modules and enable ssl_module
Open cmd.
Change into the directory where you extracted Laravel e.g: cd C:\wamp\www\laravel.
Type the command: composer install.
Installation completed.
Open httpd.conf file
Add these lines after Include "c:/wamp/alias/"*
Listen 8000
DocumentRoot c:/wamp/www/laravel/public
Open Browser and go to localhost:8000
You follow given Only 1 step and install laravel 5 and composer in your machine
[1]Paste this in cmd : composer create-project laravel/laravel
when you run above command it will automatically install composer and laravel
OPTIONAL:
if error your configuration does not allow connection to
http//packages.firegento.com in cmd follow this command :
composer config -g secure-http false

Resources