Skip to content

novatura/laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Novatura Laravel Utilities

Repository Tracking

  • Frontend scaffolding (custom implementation of Breeze)
  • Roles and Permissions scaffolding
  • Model logging scaffolding
  • User History scaffolding
  • Error Central scaffolding
  • Repository Pattern scaffolding

Usage

Installation

composer require novatura/laravel

Commands

Scaffold

Install basic login/register functionality with Mantine UI.

php artisan novatura:scaffold:install

Make Inertia page

php artisan novatura:make:page {name}

Local Development

Local development is a bit tricky, because we need to mount this repository into the docker container of a sandbox/testing project.

The following steps are going to have you create a fresh laravel project and mount this repository into it.

  1. Create a fresh Laravel project with Sail somewhere other than this repository

    • laravel new sandbox && cd sandbox
    • composer require laravel/sail --dev
    • php artisan sail:install
      • When prompted, select mysql, redis and mailpit
  2. Add this repository as a package by adding the following to the end of your ./composer.json

    {
        "repositories": [
            {
                "type": "path",
                "url": "/Users/{username}/code/novatura/laravel",
                "options": {
                    "symlink": false
                }
            }
        ]
    }

    This tells composer to check both the online repo and the local path for a package when you run composer install.

    I'm sure you can get a relative path to work, I just haven't bothered. Absolute paths work fine. Make sure you change {username} to your actual username. (now is probably a good time to say I have only tested any of this on MacOS)

  3. Install package: composer require novatura/laravel @dev

    • The @dev is required - it won't work without it.
    • If you ever get an error about not finding a release - it's because you forgot the @dev.
  4. Publish sail's docker-compose.yml file: php artisan sail:publish

  5. Modify the ./docker-compose.yml to mount this repo:

    Change:

    volumes:
        - '.:/var/www/html'

    To:

    volumes:
        - '.:/var/www/html'
        - '/Users/{username}/code/novatura/laravel:/var/www/html/vendor/novatura/laravel'

    If you forgot to include Mailpit when setting up sail, add it as a service to docker-compose.json:

    mailpit:
        image: 'axllent/mailpit:latest'
        ports:
            - '${FORWARD_MAILPIT_PORT:-1025}:1025'
            - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
        networks:
            - sail
  6. Start sail: ./vendor/bin/sail up

  7. Link storage: ./vendor/bin/sail artisan storage:link

  8. Make a git commit in your sandbox project

    • This is so that you can constantly roll back to the clean slate 😉

At this stage, you can use our commands and such, e.g. php artisan novatura:scaffold:install

Whenever you want to test a command or a change, you'll want to reinstall the package so that it sends the latest code to the docker container!

For example:

composer require novatura/laravel @dev && php artisan novatura:scaffold:install

With Sail running, you can access all outbound emails by going to http://localhost:8025 in your browser (Mailpit dashboard).

About

Core functionality and scaffolding for Novatura Laravel Projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •  

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy