Llum illuminates your Laravel projects speeding up your Github/Laravel development workflow

Overview

llum

Speed up you Github/Laravel development workflow illuminating packages with llum:

asciicast

Total Downloads Latest Stable Version Scrutinizer Code Quality Build Status StyleCI Build Status

Now supports Laravel 5.4.

See also:

Install notes

composer global require "acacha/llum=~1.0"

Requirements

Some commands use bash commands like GNU sed and touch.On Windows you can use CygWin or see StackOverflow

On MAC OS use GNU sed instead of default installed BSD sed

brew install gnu-sed --with-default-names

Commands

init

Execute:

llum init
Please enter your github username (sergi) ? 
Do you want to use our assistant to obtain token via Github API (Y/n)?Y
Github password?

To configure your Bithub user and obtain a token to interact with github using llum commands (see github command section below). This command creates file ~/.llumrc , an example:

~ cat .llumrc 
; Llum configuration file

[github]
username = acacha
token = token_here
token_name = your token name here

You can avoid providing password creating manually this file an putting your personal Github acces token (https://github.com/settings/tokens) on ~/.llumrc file.

Github

IMPORTANT: Requires previous execution of llum init command to work.

github:init

IMPORTANT: Requires previous execution of llum init command to work.

This commands initializes a Github repo, create a first commit, create a Github repo and syncs local content with Github repo. The commands executed are:

git init
git add .
git commit -a -m "Initial version"
llum github:repo
git pull origin master
git push origin master

Example:

master ">
$ cd myproject
$ llum github:init
Running command git init...
S'ha inicialitzat un buit dipòsit de Git a /home/sergi/myproject/.git/
Running command git add ....
Running command git commit -a -m "Initial version"...
[master (comissió d'arrel) 563473d] Initial version
 1 file changed, 0 insertions(+), 0 deletions(-)
 ...
Running command llum github:repo...
Repository myproject created
Running command git remote add origin [email protected]:acacha/myproject.git...
Running command git pull origin master...
fatal: Couldn't find remote ref master
Running command git push origin master...
Comptant els objectes: 3, fet.
Escrivint els objectes: 100% (3/3), 216 bytes | 0 bytes/s, fet.
Total 3 (delta 0), reused 0 (delta 0)
To [email protected]:acacha/myproject.git
 * [new branch]      master -> master

github:repo

IMPORTANT: Requires previous execution of llum init command to work.

Create a new Github repo:

mkdir && cd newrepo
llum github:repo

This create a new Github repo called {yourgithubusername}/newrepo (the current folder name is used) . You can provide a name for the repo with:

llum github:repo reponame

boot

Execute commands:

  • devtools
  • sqlite
  • migrate
  • serve

And your are ready to go!

devtools

Install and configure amazing debug tools Laravel Debugbar and Laravel-ide-helper

llum devtools

debugbar

You can install only Laravel Debugbar devtool with:

llum debugbar

idehelper

You can install only Laravel-ide-helper devtool with:

llum idehelper

sqlite

Once you've installed a new laravel project use sqlite command to active sqlite

laravel new larapp
cd larapp
llum sqlite
File database/database.sqlite created successfully
.env file updated successfully

And sqlite is ready to go:

php artisan migrate 
Migration table created successfully.
Migrated: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_100000_create_password_resets_table

provider

Add a provider to config/app.php file:

llum provider Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class

alias

Add an alias/Facade to config/app.php file:

llum alias Socialite Laravel\Socialite\Facades\Socialite::class

serve

Similar to php artisan serve but some enhacements:

  • First tyry to use port 8000 but if is already in use (in mi case so many times this occurs because Laravel homestead is up) then tries with following port numbers (8001, 8002, 8003)
  • If sensible-browser command is available then starts browser
llum serve
Running php artisan serve --port=8002
Opening http://localhost:8002 with default browser

migrate

Runs php artisan migrate

llum migrate

Packagist

https://packagist.org/packages/acacha/admin

Troubleshooting

GNU sed on MAC OS

Acacha llum need GNU sed to work so replace BSD sed with GNU sed using:

brew install gnu-sed --with-default-names

Check you version of sed with:

man sed

sed GNU version path is:

$ which sed
/usr/local/bin/sed

Instead of default path of BSD sed (installed by default on MAC OS):

/usr/bin/sed

More info at https://github.com/acacha/adminlte-laravel/issues/58

Working notes

Update value in .env file with sed:

sed -i '/^MAIL_DRIVER=/s/=.*/=log/' .env

Comment database entries:

sed -i 's/^DB_/#DB_/g' .env

Add sqlite before database entries:

sed 's/.*DB_HOST.*/DB_CONNECTION=sqlite\n&/' .env

Artisan serve always working:

$continue = true;
$port = 8000;
do {
    echo "Testing with port: ". $port;
    if (check_port($port)) {
        passthru('php artisan serve --port=' . $port);
        $continue=false;
    }
    $port++;
} while ($continue);

echo "END";
function check_port($port,$host = '127.0.0.1') {
    $fp = @fsockopen($host, $port,$errno, $errstr, 5);
    if (!$fp) {
        return true;
    } else {
        // port is open and available
        return false;
        fclose($fp);
    }
}

Solution with php preg_replace function:

file_put_contents(base_path('.env'), preg_replace("/(MAIL_DRIVER)=(.*)/", "$1=log", file_get_contents(base_path('.env'))));

Insert provider in config/app.php file:

sed '/.*#llum_providers.*/a \\tBarryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class,\n' config/app.php
Comments
  • Problem Installing Acacha/llum

    Problem Installing Acacha/llum

    I'm try to install Acacha/llum with Laravel 5.4. i'm use Valet how http/mysql service. I' fixed removing valet and install llum then install valet.

    The errors is on this packages:

    Problem 1 - Conclusion: don't install acacha/llum 1.1.12 - Conclusion: don't install acacha/llum 1.1.11 - Conclusion: don't install acacha/llum 1.1.10 - Conclusion: don't install acacha/llum 1.1.8 - Conclusion: don't install acacha/llum 1.1.7 - Conclusion: don't install acacha/llum 1.1.6 - Conclusion: don't install acacha/llum 1.1.5 - Conclusion: don't install acacha/llum 1.1.4 - Conclusion: don't install acacha/llum 1.1.3 - Conclusion: don't install acacha/llum 1.1.2 - Conclusion: don't install acacha/llum 1.1.1 - Conclusion: remove illuminate/contracts v5.4.19 - Installation request for tightenco/collect (locked at v5.4.20) -> satisfiable by tightenco/collect[v5.4.20]. - Installation request for symfony/console (locked at v3.2.8) -> satisfiable by symfony/console[v3.2.8]. - Installation request for acacha/llum ^1.1 -> satisfiable by acacha/llum[1.1, 1.1.1, 1.1.10, 1.1.11, 1.1.12, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8]. - Conclusion: don't install illuminate/contracts v5.4.19 - acacha/llum 1.1 requires illuminate/config ~5.3.0 -> satisfiable by illuminate/config[v5.3.0, v5.3.16, v5.3.23, v5.3.4]. - illuminate/config v5.3.0 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4]. - illuminate/config v5.3.16 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4]. - illuminate/config v5.3.23 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4]. - illuminate/config v5.3.4 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[v5.3.0, v5.3.16, v5.3.23, v5.3.4]. - Can only install one of: illuminate/contracts[v5.3.0, v5.4.19]. - Can only install one of: illuminate/contracts[v5.3.16, v5.4.19]. - Can only install one of: illuminate/contracts[v5.3.23, v5.4.19]. - Can only install one of: illuminate/contracts[v5.3.4, v5.4.19]. - Installation request for illuminate/contracts (locked at v5.4.19) -> satisfiable by illuminate/contracts[v5.4.19].

    opened by wcervini 5
  • Failed to listen on localhost:8000 (reason: Address already in use)

    Failed to listen on localhost:8000 (reason: Address already in use)

    i start other project.


    php artisan serve Laravel development server started on http://localhost:8000/ [Sun May 15 22:48:57 2016] Failed to listen on localhost:8000 (reason: Address already in use)

    opened by includeleec 2
  • Handling some file paths when there is a space in it

    Handling some file paths when there is a space in it

    Description

    I made llum able to deal with paths that contain spaces. My changes can be summarized as bellow:

    • I replaced the " " (space character) for "\ " in the function passthru in some PHP files for the paths; and
    • I added double quotes to the bash scripts that deals with paths in order to deal with them correctly.

    Motivation and context

    Users that have llum installed in a folder that has a space in the full path could not run llum because it was generating errors as the path is "broken" because of the space. This issue was opened at https://github.com/acacha/adminlte-laravel/issues/225. A pull request for AdminLTE Laravel Installer is proposed as part of the solution for the problem: https://github.com/acacha/adminlte-laravel-installer/pull/13.

    How has this been tested?

    This is what I did:

    1. I created a virtual machine with Ubuntu 16.04 using vagrant and created an user with the home folder /home/cleber alcantara/.
    2. I installed composer, laravel and adminlte-installer.
    3. I created a laravel project and tried to run adminlte-laravel install. This last command generated the errors described in the issue mentioned in the previous section.
    4. I edited the files in the /home/cleber alcantara/.composer/vendor/acacha/adminlte-laravel-installer and /home/cleber alcantara/.composer/vendor/acacha/llum in order to fix the problems.
    5. I created a project using laravel and ran adminlte-laravel install successfully.
    6. I tested the new projects in my browser and they worked as expected.
    7. I renamed home directory to /home/cleber and proceeded the same way, creating projects using laravel and running adminlte-laravel install. No errors occurred, which means my changes did not affect the "normal cases" when the paths for llum and adminlte-laravel do not have spaces.

    Types of changes

    What types of changes does your code introduce? Put an x in all the boxes that apply:

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    opened by clebersa 1
  • Update for new Laravel versions + fix for .php_cs

    Update for new Laravel versions + fix for .php_cs

    Hi,

    just a minor update to composer.json ... Tested out with new Laravel version, works fine. Also, update to your .php_cs file ... It autoruns on my machine, so when it gave out errors, fixed it.

    Best regards,

    Marin

    P.S. fixed the mess I made of the git log, and also upped the PHP version to 5.6.4

    opened by mormy 1
  • Error

    Error

    PHP Fatal error: Uncaught TypeError: Argument 1 passed to Acacha\Llum\Console\BootCommand::serve() must implement interface Symfony\Component\Console\Input\InputInterface, none given, called in /home/sergi/.composer/vendor/acacha/llum/src/Console/BootCommand.php on line 50 and defined in /home/sergi/.composer/vendor/acacha/llum/src/Traits/Serve.php:21 Stack trace: #0 /home/sergi/.composer/vendor/acacha/llum/src/Console/BootCommand.php(50): Acacha\Llum\Console\BootCommand->serve() #1 /home/sergi/.composer/vendor/acacha/llum/src/Console/LlumCommand.php(331): Acacha\Llum\Console\BootCommand->boot(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #2 /home/sergi/.composer/vendor/symfony/console/Command/Command.php(256): Acacha\Llum\Console\LlumCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 /home/sergi/.composer/vendor/symfony/console/Application.php(820): Symfony\Component\Console\Command\Command in /home/sergi/.composer/vendor/acacha/llum/src/Traits/Serve.php on line 21

    opened by acacha 1
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @acacha requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/acacha/llum/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @acacha requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/acacha/llum/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @acacha requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/acacha/llum/

    opened by scrutinizer-auto-fixer 0
  • Scrutinizer Auto-Fixes

    Scrutinizer Auto-Fixes

    @acacha requested this pull request.

    It consists of patches automatically generated for this project on Scrutinizer: https://scrutinizer-ci.com/g/acacha/llum/

    opened by scrutinizer-auto-fixer 0
  • Problems to run version 2.

    Problems to run version 2.

    When I run every llum command I received

    PHP Fatal error:  Uncaught Error: Class 'Illuminate\Config\Repository' not found in /Users/myUser/.composer/vendor/acacha/llum/src/Console/LlumCommand.php:256
    Stack trace:
    #0 /Users/myUser/.composer/vendor/acacha/llum/src/Console/LlumCommand.php(114): Acacha\Llum\Console\LlumCommand->obtainConfig()
    #1 /Users/myUser/.composer/vendor/acacha/llum/llum(20): Acacha\Llum\Console\LlumCommand->__construct()
    #2 {main}
      thrown in /Users/myUser/.composer/vendor/acacha/llum/src/Console/LlumCommand.php on line 256
    
    Fatal error: Uncaught Error: Class 'Illuminate\Config\Repository' not found in /Users/myUser/.composer/vendor/acacha/llum/src/Console/LlumCommand.php:256
    Stack trace:
    #0 /Users/myUser/.composer/vendor/acacha/llum/src/Console/LlumCommand.php(114): Acacha\Llum\Console\LlumCommand->obtainConfig()
    #1 /Users/myUser/.composer/vendor/acacha/llum/llum(20): Acacha\Llum\Console\LlumCommand->__construct()
    #2 {main}
      thrown in /Users/myUser/.composer/vendor/acacha/llum/src/Console/LlumCommand.php on line 256
    
    opened by fhferreira 0
  • provider commands doesn't support \ in provider name

    provider commands doesn't support \ in provider name

    If I execute:

    llum provider Prettus\Repository\Providers\RepositoryServiceProvider::class
    

    Then;

     php artisan make:entity Shit
                                                                            
      [Symfony\Component\Debug\Exception\FatalThrowableError]                
      Class 'PrettusRepositoryProvidersRepositoryServiceProvider' not found  
    

    So scape \

    opened by acacha 0
Owner
Sergi Tur Badenas
Computer Science Teacher and Open Source contributor in my free time. Creator of adminlte-laravel. Newsletter: https://sergiturbadenas.ck.page/797d91fd9
Sergi Tur Badenas
Rapidly speed up your Laravel workflow with generators

Fast Workflow in Laravel With Custom Generators This Laravel package provides a variety of generators to speed up your development process. These gene

Jeffrey Way 22 Oct 28, 2022
Durable workflow engine that allows users to write long running persistent distributed workflows in PHP powered by Laravel queues

Durable workflow engine that allows users to write long running persistent distributed workflows (orchestrations) in PHP powered by Laravel queues. Inspired by Temporal and Azure Durable Functions.

null 268 Dec 27, 2022
symfony workflow component for laravel7 and 8 ,php 7 and 8

Laravel workflow Use the Symfony Workflow component in Laravel8,PHP7,PHP8 This repository based on @brexis,his project since 2019-09 No longer maintai

null 3 Jul 21, 2022
A new way of Running Tinker. Simplify the Web Artisan's workflow.

Tinkerun A new way of Running Tinker. Simplify the Web Artisan's workflow. inspired by Tinkerwell Download links Github Releases ?? If you are using V

Tinkerun 327 Dec 29, 2022
Ghygen is a GitHub Actions configurator for your PHP / Laravel project.

Ghygen Ghygen is a GitHub actions Yaml Generator. Ghygen allows you creating your Yaml file for GitHub Actions, for Laravel/PHP web application, so yo

Hi Folks! 268 Dec 11, 2022
👀 Manage your views in Laravel projects through artisan

Artisan View This package adds a handful of view-related commands to Artisan in your Laravel project. Generate blade files that extend other views, sc

Sven Luijten 842 Dec 29, 2022
Easily set up a sync endpoint to support Watermelon DB in your Laravel projects.

Laravel Watermelon This package provides a Watermelon DB backend sync implementation for Laravel. Watermelon DB is a robust local database synchroniza

Nathan Heffley 18 Dec 21, 2022
Easy-to-use SDK for implementing Neshan APIs in your Laravel projects.

Neshan Laravel SDK Easy-to-use SDK for implementing Neshan APIs in your Laravel projects. Install The easiest way to install is by using Composer: com

null 1 Oct 22, 2022
Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant

The unobtrusive Laravel package that makes your app multi tenant. Serving multiple websites, each with one or more hostnames from the same codebase. B

Tenancy 2.4k Jan 3, 2023
Github repository dedicated for my YT tutorial which shows how to use testing in Laravel

Testing in Laravel The following documentation is based on my Laravel Testing for Beginners tutorial we’re going to cover the basics of unit tests, fe

Code With Dary 17 Oct 24, 2022
Generate GitHub pull request preview deployments with Laravel Forge

Forge Previewer WARNING: This package is not ready for production usage. Use at your own risk. This package provides a forge-previewer command that ca

Ryan Chandler 43 Dec 15, 2022
Quickly generate pivot tables for your projects

Laravel Pivot Table Generator Quickly generate pivot tables for your projects! Table of Contents Installation Usage More generator packages Contributi

Tim Wassenburg 5 May 30, 2022
Invite System for GitHub Organizations

Invite System for GitHub Organizations OrgManager takes Github Organization invites to a new level! Read more on the OrgManager documentation. Table o

OrgManager 199 Dec 25, 2022
If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

hirwa-products-plugin If you are beginner in WordPress plugin development or if you want to develop your own store product plugin you use this plugin

NIYIBIZI HIRWA 1 Aug 23, 2022
Jumpstart your web development journey with the HALT Stack Starter Kit, a one-command solution for creating dynamic, scalable, and clean web applications.

Welcome to the HALT Stack Starter Kit! This kit is designed to help you kickstart your web development projects using the HALT Stack, a powerful combi

HALT Stack 6 Jun 7, 2023
Useful blade components and functionality for most Laravel projects.

laravel-base Note: Package is still in early stages of development, so functionality is subject to change. LaravelBase is a package I've created to pr

Randall Wilk 3 Jan 16, 2022
Laravel-Mix helper for projects with complex & multi assets.

Laravel-Mix helper for projects with complex & multi assets. ?? Getting started Since mix introduced in laravel 5.4 it is recommended to use this pack

Fandogh 27 Oct 4, 2022
Provides access to Pexels API for Laravel projects

Laravel Pexels Provides access to Pexels API for Laravel projects Table of contents Installation Using Installation To get the latest version of Larav

Raviga Group Limited 3 Dec 1, 2022
LaravelFly is a safe solution to speeds up new or old Laravel 5.5+ projects, with preloading and coroutine, while without data pollution or memory leak

Would you like php 7.4 Preloading? Would you like php coroutine? Today you can use them with Laravel because of Swoole. With LaravalFly, Laravel will

null 456 Dec 21, 2022