GithubHelp home page GithubHelp logo

curly-train's Introduction

A Laravel with MySQL template on Gitpod

This is a Laravel with MySQL template configured for ephemeral development environments on Gitpod.

Next Steps

Click the button below to start a new development environment:

Open in Gitpod

Get Started With Your Own Project

A new project

Click the above "Open in Gitpod" button to start a new workspace. Once you're ready to push your first code changes, Gitpod will guide you to fork this project so you own it.

An existing project

To get started with Laravel with MySQL on Gitpod, add a .gitpod.yml file which contains the configuration to improve the developer experience on Gitpod. To learn more, please see the Getting Started documentation.

Notes & caveats

The database does not get automatically migrated. Once started, we should run php artisan migrate, after the DB service is ready. It should be a few moments.

If you want to try a Laravel Breeze scaffolding, then you should be aware that files will be changed, and you will to revert some content.

You will have to do these steps:

composer require laravel/breeze --dev

php artisan breeze:install blade # or vue or react

# Revert changes on `vite.config.js` file, as accordingly on the next code block

# Then you can again recompile
npm run dev

# Go the the browser URL of port 8000. Make sure to open browser inspector, to reload all assets.

This is the look vite.config.js should be after installing the Blade flavour of Breeze. If you chose another one, let's look at what should be replaced back in:

  • The dotenv import and its configuration invoke.
  • The definition of extendedViteDevServerOptions, plus conditionally change it, plus adding it to the vite config object.

Here it is the final look:

import {defineConfig} from 'vite'
import laravel from 'laravel-vite-plugin'
import dotenv from 'dotenv'

dotenv.config()

const extendedViteDevServerOptions = {}

if (process.env.GITPOD_VITE_URL) {
    extendedViteDevServerOptions.hmr = {
        protocol: 'wss',
        host: new URL(process.env.GITPOD_VITE_URL).hostname,
        clientPort: 443
    }
}

export default defineConfig({
server: {
        ...extendedViteDevServerOptions
    },
plugins: [
    laravel({
        input: [
            'resources/css/app.css',
            'resources/js/app.js',
        ],
        refresh: true,
    }),
],
})

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.