Giter Club home page Giter Club logo

laravel-new-app's Introduction

Laravel New App - Step by Step

Pratical step-by-step how to do a new app in Laravel 5.5 and set permissions correctly on linux

Prerequisites

  • Apache
  • PHP
  • Composer

Initial notes

The project in this repo is just one example of a new app build in Laravel. If you cloned it you shouldn't run the first step.

Step 1 - Create the project

Considering that composer is installed, run

composer create-project --prefer-dist laravel/laravel laravel-new-app

Step 2 - Encryption key

In the project dir, generate the laravel encryption key running

php artisan key:generate

Step 3 - Set permissions

Set 755 permission to project (laravel-new-app) dir

chmod -R 755 laravel-new-app

Set "www-data" group owner to "storage" dir and "bootstrap/cache" dir

chown -R :www-data laravel-new-app/storage
chown -R :www-data laravel-new-app/bootstrap/cache

Set 775 permission to "storage" dir and "bootstrap/cache" dir

chmod -R 775 laravel-new-app/storage
chmod -R 775 laravel-new-app/bootstrap/cache

Step 4 - Configure database

On .env file set the database (mysql in this example)

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=mynewapp
DB_USERNAME=usermysql
DB_PASSWORD=passwordmysql

Step 5 - Run migrations

To test database and create the first tables run

php artisan migrate

Note

If any permission error appear while testing the project, repeat step 3.

References

laravel-new-app's People

Contributors

cantellir avatar

Forkers

crasader

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.