# This file describes an application. You can have multiple applications
# in the same project.

# The name of this app. Must be unique within a project.
name: php

# The toolstack used to build the application.
type: php:5.5
build:
    flavor: composer

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
    database: "mysql:mysql"

# The configuration of app when it is exposed to the web.
web:
    # The public directory of the app, relative to its root.
    document_root: "/public"
    # The front-controller script to send non-static requests to.
    passthru: "/index.php"

# The size of the persistent disk of the application (in MB).
disk: 1024

# The mounts that will be performed when the package is deployed.
mounts:
    "/storage": "shared:files/storage"
    "/bootstrap/cache": "shared:files/cache"

hooks:
    build: |
        mkdir storage/app
        mkdir -p storage/framework/cache
        mkdir storage/framework/sessions
        mkdir storage/framework/views
        mkdir storage/logs
        #php artisan key:generate
    deploy: |
        php artisan migrate --seed
        php artisan vendor:publish

# This file describes an application. You can have multiple applications
# in the same project.

# The name of this app. Must be unique within a project.
name: php

# The toolstack used to build the application.
type: php:5.5
build:
    flavor: composer

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
    database: "mysql:mysql"

# The configuration of app when it is exposed to the web.
web:
    # The public directory of the app, relative to its root.
    document_root: "/public"
    # The front-controller script to send non-static requests to.
    passthru: "/index.php"

# The size of the persistent disk of the application (in MB).
disk: 1024

# The mounts that will be performed when the package is deployed.
mounts:
    "/storage": "shared:files/storage"
    "/bootstrap/cache": "shared:files/cache"

hooks:
    build: |
        #php artisan key:generate
    deploy: |
        mkdir storage/app
        mkdir -p storage/framework/cache
        mkdir storage/framework/sessions
        mkdir storage/framework/views
        mkdir storage/logs
        # Only need to run this once.
        php artisan migrate --seed

Create folders in a deploy hook.
Create folders in a deploy hook.