1. Startseite
  2. PHP
  3. Installieren von Laravel

Installieren von Laravel

Übersicht

Laravel is a PHP framework built around abstraction: do more with less coding. Laravel runs off PHP and MySQL. It is supported on any package, but works best with a package that supports terminal access. For this guide, we will assume terminal access is available.

Installation

Begin by logging into the Terminal.

  1. VORAUSSETZUNG: Install Composer if it has not already been installed.
  2. Install Laravel in a new directory called laravel/ unter /var/www using Composer:
    cd /var/www
    composer create-project laravel/laravel laravel

    Note: “laravel” is intentionally present 3 times, the argument format to composer create-project ist channel/package directory

  3. Change permissions on Laravel asset directories to permit write-access of logs, compiled views, and temporary file storage.
    cd laravel/
    chmod -R 777 storage bootstrap/cache
  4. Connect Laravel to a Subdomain oder Addon-Domäne within the control panel under Web > Subdomains. Specify öffentlich/ for its Dokumentenstamm; in the above example, this path is /var/www/laravel/public

Empty output

Certain combinations of Laravel and PHP may yield a page without content. In such situations, turn off output_buffering im .htaccess file located under öffentlich/:

php_value output_buffering 0

Siehe auch

Aktualisiert am März 7, 2021

Verwandte Artikel