Laravel 5.1 + phpsysinfo - how? - php

I'm currently experimenting with Laravel 5.1
I want to display realtime resource usage and thus I found phpsysinfo. I've required it into my project via composer and I'm able to run and view a working version by viewing phpsysinfo's root directory.
How do I actually then start displaying this on my /public pages ? I can't see any type of syntax on phpsysinfo's documentation.

Related

Having trouble configuring Laravel

I'm using Laravel with intellij and whenever I run my project this is what it looks like in the web browser
I'm not sure if I set up Laravel correctly on intellij. I set it up for XAMPP because I thought that was the problem however my pages are still looking like the image above.
probably it's not laravel problem. Maybe is better to setup local server in right way. You can try:
php artisan serve
under laravel root dir and then open in http://localhost:8000 in browser
Those icons are trying to use php built in server and may not be configured to match your laravel project. I get the same thing as you with localhost:63342 when clicking web browser preview icons in my Symfony project. I just configured phpStorm preview icons to load based on my web server root.
When using laravel, trying to load your blade views directly will most likely run into issues. Your request is not being mapped to a route/controller for it to be properly handled. For my symfony project and after configuring phpStorm, i get sent to app.dev/app/Resources/views/test.php, which is not a valid route (proves point of previous sentence). You will most likely get the same issue in your laravel project.
You can configure your phpStorm preview icons to load to your localhost:8000 / app.dev or whatever you may have set your app host to.
Follow the below phpStorm articles if you want to mess with this some more.
https://www.jetbrains.com/help/phpstorm/2016.3/working-with-web-servers-copying-files.html
https://www.jetbrains.com/help/phpstorm/2016.3/creating-a-local-server-configuration.html

Publish Laravel Project and Project Deployment on LAMP

I am now developing a PHP website using Laravel 5 framework. I published the website through Git clone to the server. However, after visiting the URL, the website only shows its structures, which is shown as: http://mikemikezhu.me/laravel/laravel_trial/
The index.php in the public folder cannot be parsed, and only the folder structure is displayed. My server is running Centos 7 system. The web server is Apache and the PHP version is 5.4.16. I am wondering whether it is because the PHP version is too old to run the Laravel. Or is there any other ways to publish the website correctly? I am not going to use Forge and Envoyer bacause they are not free of charge.
Check if you have the correct PHP version for your application with the command:
php -v
If you are using Laravel 5.0 you need PHP >= 5.4, PHP < 7
If you are using Laravel 5.1 you need PHP >= 5.5.9
If you are using Laravel 5.2 you need PHP >= 5.5.9
If you are deploying the app with Git, check if the folder permissions are correct and compatible with the Apache user.
Firstly make sure the whole directory structure including files is owned by the apache user - using the chown command.
you'll want to point your vhost to the public folder, not the project route
https://laravel.com/docs/5.0/errors shows you how to enable debug and logging - great for seeing why it might not be working
I'd update to at least PHP 5.6 as #amieiro mentions

Running a Laravel Application alongside another app

So I have a question relating running a Laravel application alongside another application and how I can achieve getting past (or utilising) Laravel's routing to run them in harmony.
So assume we have the following file structure
Public_html
/public - holding Laravel files
/billing - holding WHMCS
How can I get around Laravel not finding routes and throwing an exception? Could I deploy the Laravel app to find the index of public in the root folder instead?

Deploy laravel 5 on Google Compute Engine

I'm using laravel 5 and trying to deploy on GCE VM Instance.
I have an existing project and using git. I've pulled my code to /var/www/ , but when I tried to access to the path http://my-ip/my-project it showed a list of directories instead.
I've also tried install a new laravel 5 into /var/www, but still result the same. Although if I go to my-ip/laravel/public it show the laravel 5 welcome page. But if I go to my-ip/laravel/public/home it showed 404 not found (/home is the route provided by laravel 5)
Can anyone help please?

Move Laravel project to another system

I tried to move my laravel 4.1 project from my office system to my personal laptop and I have tried it using various methods:
1) git and bitbucket
2) zipped whole folder and copy
3) using composer install/update on laptop directory to update my dependencies
Neither of the above has worked for me.
I do see my landing page but on clicking any link, it shows:
Not Found
The requested URL was not found on this server.
Seems like some routing error but I do see my index page. Thanks in advance.
It must be a problem with the url rewriting on your system . make sure you fix your htaccess/nginx directives . and also make sure configurations such as mod_rewrite is enabled .
In future try using laravel homestead , so that you have consistent environment across various workstations. It's the recommended way of working using laravel.

Categories