πŸ“¦ Adds Laravel Packages Support to Lumen and Vendor Publish Artisan Command.

Overview

Larasupport

Join PHP Chat Chat on Telegram Package for Lumen Latest Version on Packagist Software License Total Downloads

Larasupport Package

Laravel Package Support for Lumen: Makes Lumen compatible with Laravel Packages. You can use any Laravel Packages in Lumen by installing Larasupport Package.

Laravel Packages make use of various global helpers that are not available in Lumen core by default which prevents us from using any Laravel Package in Lumen.

This package adds the missing pieces to make Lumen compatible along with the support for vendor:publish artisan command and other features.

Quick Start

Install

You can add the package directly by firing this command

$ composer require irazasyed/larasupport

Add Service Provider

Add this service provider to your bootstrap/app.php file.

$app->register(Irazasyed\Larasupport\Providers\ArtisanServiceProvider::class);

Artisan Service Provider is an optional provider required only if you want vendor:publish command working.

And you're done! You can now start installing any Laravel Package out there :)

Available Methods

These helpers can be used across your Lumen project, not only with Laravel Packages.

Paths

app_path

Get the fully qualified path to the app directory.

public_path

Get the fully qualified path to the public directory. You can set env variable PUBLIC_PATH and it'll return the same instead of the default public.

config_path

Get the fully qualified path to the config directory (Mostly used with Laravel Packages).

Artisan

vendor:publish

Artisan command to Publish any publishable assets from vendor packages (Required to get Laravel Packages working!).

php artisan vendor:publish

OR

php artisan vendor:publish --provider="Vendor\Providers\PackageServiceProvider" 

Other

route_parameter

route_parameter($name, $default = null)

Get a given parameter from the route.

Contributing

Thank you for considering contributing to the project. Please read the contributing guide before creating an issue or sending in a pull request.

Code of Conduct

Please read our Code of Conduct before contributing or engaging in discussions.

Security

If you discover a security vulnerability within this project, please email Syed at syed at lukonet.com. All security vulnerabilities will be promptly addressed. You may view our full security policy here.

Additional information

Any issues, please report here

Credits

License

The Laravel framework is open-sourced software licensed under the MIT license. Larasupport consists almost entirely of Laravel source code, so maintains the same license. Please see License File for more information.

FOSSA Status

Comments
  • ReflectionError - handle() method does not exist

    ReflectionError - handle() method does not exist

    I am trying to use Vinkla/pusher package with Lumen. I have installed the package and registered it in app.php. However when I run php artisan vendor:publish it displays the following error.

    [ReflectionException] Method Irazasyed\Larasupport\Console\VendorPublishCommand::handle() does not exist

    Please advice if I'm missing anything

    opened by hzburki 5
  • Getting issue on compatible with spatie/laravel-newsletter

    Getting issue on compatible with spatie/laravel-newsletter

    • Library Version: 1.7.0
    • Lumen Version: 5.8.13
    • PHP Version: 7.1.33

    Description
    After updating your library version 1.7.0, Im getting error from laravel newsletter saying below error message.

    Call to undefined method Laravel\Lumen\Application::configPath() newsletter

    After rollback to your earlier version, It start working fine. Now, I have fixed the version to 1.6.0 to avoid updating your library.

    Steps To Reproduce

    Possible Solution

    Additional Context

    Logs
    opened by kganeshenoah 3
  • Class 'Irazasyed\Larasupport\Providers\ArtisanServiceProvider' not found Lumen

    Class 'Irazasyed\Larasupport\Providers\ArtisanServiceProvider' not found Lumen

    Hello there! I am using lumen 8.0 microservice to implement an mqtt communication, but when I publish a package php artisan vendor:publish --provider="Salman\Mqtt\MqttServiceProvider"

    it shows me this error: Class 'Irazasyed\Larasupport\Providers\ArtisanServiceProvider' not found

    I have already added the service provider to bootstrap/app.php file. $app->register(Irazasyed\Larasupport\Providers\ArtisanServiceProvider::class);

    thank you in advance

    opened by AdrianaTheo 2
  • Documentation is not enough, apologies if I am wrong

    Documentation is not enough, apologies if I am wrong

    Description
    I have followed both step:

    composer require irazasyed/larasupport
    

    and

    $app->register(Irazasyed\Larasupport\Providers\ArtisanServiceProvider::class);
    

    and now I trying to use the following laravel package

    https://cartalyst.com/manual/stripe-laravel/13.x

    which requires a ServiceProvider, Facade to be registered and define stripe > secret variable. How and where to do that? Can you please guide me?

    Thanks

    opened by themodernpk 1
  • Not working in Lumen 5.8 with latest spatie/laravel-permission v3.17.0

    Not working in Lumen 5.8 with latest spatie/laravel-permission v3.17.0

    Hello,

    I had the following issue after upgrading both spatie/laravel-permission and larasupport to latest versions.

    [2020-10-13 08:44:11] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Laravel\Lumen\Application::configPath() in /var/www-hosts/FondleApi/vendor/irazasyed/larasupport/src/helpers.php:44
    Stack trace:
    #0 /var/www-hosts/FondleApi/vendor/spatie/laravel-permission/src/PermissionServiceProvider.php(19): config_path()
    #1 [internal function]: Spatie\Permission\PermissionServiceProvider->boot()
    #2 /var/www-hosts/FondleApi/vendor/illuminate/container/BoundMethod.php(32): call_user_func_array()
    #3 /var/www-hosts/FondleApi/vendor/illuminate/container/BoundMethod.php(90): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    #4 /var/www-hosts/FondleApi/vendor/illuminate/container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod()
    #5 /var/www-hosts/FondleApi/vendor/illuminate/container/Container.php(576): Illuminate\Container\BoundMethod::call()
    #6 /var/www-hosts/FondleApi/vendor/laravel/lumen-framework/src/Application.php(244): Illuminate\Container\Container->call()
    #7 /var/www-hosts/FondleApi/vendor/laravel/lumen-framework/src/Application.php(229): Laravel\Lumen\Application->bootProvider()
    #8 [internal function]: Laravel\Lumen\Application->Laravel\Lumen\{closure}()
    #9 /var/www-hosts/FondleApi/vendor/laravel/lumen-framework/src/Application.php(230): array_walk()
    #10 /var/www-hosts/FondleApi/vendor/laravel/lumen-framework/src/Console/Kernel.php(113): Laravel\Lumen\Application->boot()
    #11 /var/www-hosts/FondleApi/artisan(35): Laravel\Lumen\Console\Kernel->handle()
    #12 {main} {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to undefined method Laravel\\Lumen\\Application::configPath() at /var/www-hosts/FondleApi/vendor/irazasyed/larasupport/src/helpers.php:44)
    

    After downgrading larasupport to v1.6.0, it is working fine.

    Could you please assist me in resolving this?

    Best regards.

    opened by bojidartonchev 1
  • Can I use all laravel packages to lumen

    Can I use all laravel packages to lumen

    Can I use all existing laravel packages to lumen after adding this larasupport package to my lumen 5.7 version?

    If so my lumen package becomes weight, Heard that facing a lot of issues from migrating to laravel from lumen. Let me know. Thanks in advance.

    opened by Gopalkrishna69 1
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 1
  • Adding bcrypt() to helpers

    Adding bcrypt() to helpers

    bcrypt() is a function used in Laravel for hashing purposes, typically for passwords, and is not included in Lumen by default and is simply an alias for app('hash')->make(). I ran into this problem when integrating Laratrust into my Lumen project.

    opened by AJMaxwell 1
  • Elixir helper

    Elixir helper

    Hello,

    thank you for this job, first of all. I can't understand the flow about Elixir helper. I can't see it in your ./helpers.php file. May you explain to me the right process?

    Thank you

    opened by encodiaweb 1
  • Laravel\Lumen\Application::routesAreCached()

    Laravel\Lumen\Application::routesAreCached()

    Hello, does this package provides any replacement for routesAreCached() method?

    I'm trying to install some Laravel packages on clean Lumen installation, with larasupport package installed, but I'm getting this FatalErrorException:

    [Symfony\Component\Debug\Exception\FatalErrorException]
    Call to undefined method Laravel\Lumen\Application::routesAreCached()
    

    If no, is there any way I could add it manually?

    Lumen: Lumen (5.2.6) (Laravel Components 5.2.*)

    opened by qodeboy 1
  • Update league/flysystem ^2.0

    Update league/flysystem ^2.0

    Description

    Example

    opened by milanbeo 0
Releases(v1.7.1)
Owner
Irfaq Syed
πŸš€ Founder @lukonet @PHPChat Creator @telegram-bot-sdk
Irfaq Syed
πŸ“ Artisan Menu - Use Artisan via an elegant console GUI

?? Artisan Menu Use Artisan via an elegant console GUI Features Run built-in and custom Artisan commands from a console GUI Prompts to enter required

Jordan Hall 148 Nov 29, 2022
Adds a way to write php and run it directly in Laravels' Artisan Tinker.

Adds a way to write php in PhpStorm/IDEA and run it directly as if through laravel artisan tinker - allowing you to quickly run a piece of code with a

Robbin 120 Jan 2, 2023
Generate services and contracts in Laravel with the artisan command

What does it do? This package adds a new php artisan make:service {name} {--N|noContract} command. It will create a service file and its contract (int

Ludovic GuΓ©net 18 Dec 21, 2022
Create Laravel views (blade template) using 'php artisan' command-line interface

About LaraBit Have you ever wonder to create Laravel views (Blade Templates) using the same type of artisan commands that you usually use to create ne

Ragib MRB 5 Oct 15, 2021
Generate services in Laravel with the artisan command

Laravel Service Generator Quickly generate services for your projects! Table of Contents Features Installation Usage Generate services Generate servic

Tim Wassenburg 15 Dec 2, 2022
An artisan command for using multiple environment configurations in Laravel 5

Laravel 5 env An artisan command for managing multiple .env of your Laravel 5 app. Installation Copy EnvCommand.php to app/Console/Commands/ of your L

Tommy Ku 18 Nov 29, 2022
This package provides you with a simplistic `php artisan make:user` command

Laracademy Generators Laracademy make:user Command - provides you with a simplistic artisan command to generate users from the console. Author(s): Lar

Laracademy 18 Jan 19, 2019
CORS (Cross-Origin Resource Sharing) support for Laravel and Lumen

Description This package adds Cross-Origin Resource Sharing (CORS) support to your Laravel application. The package is based on Framework agnostic (PS

null 48 Feb 1, 2020
Composer package which adds support for HTML5 elements using Laravels Form interface (e.g. Form::date())

Laravel HTML 5 Inputs Composer package which adds support for HTML5 elements by extending Laravel's Form interface (e.g. Form::date()) Adds support fo

Small Dog Studios 11 Oct 13, 2020
This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.

Laravel Verify New Email Laravel supports verifying email addresses out of the box. This package adds support for verifying new email addresses. When

Protone Media 300 Dec 30, 2022
An easy way to get vendor and package data from Packagist via API calls

Laravel Packagist Laravel Packagist (LaravelPackagist) is a package for Laravel 5 to interact with the packagist api quickly and easily. Table of cont

Jeremy Kenedy 5 Jul 18, 2022
A simple pure PHP RADIUS client supporting Standard and Vendor-Specific Attributes in single file

BlockBox-Radius A simple pure PHP RADIUS client supporting Standard and Vendor-Specific Attributes in single file Author: Daren Yeh [email protected]

null 2 Oct 2, 2022
Removes whitelisted unnecessary files (like tests/docs etc.) from vendor directory

Composer vendor cleanup This is a simple script for the Composer to remove unnecessary files (documentation/examples/tests etc.) from included vendor

Chris 2 Nov 14, 2022
Collection of agnostic PHP Functions and helpers with zero dependencies to use as foundation in packages and other project

Collection of agnostic PHP Functions and helpers This package provides a lot of very usefull agnostic helpers to use as foundation in packages and oth

padosoft 54 Sep 21, 2022
Allow your model to record the creation, update and deletion of user fingerprints in laravel packages

This laravel package will allow your models to record the the created, updated and deleted by User FingerPrints

Managemize 4 Mar 11, 2022
Package for Laravel that gives artisan commands to setup and edit environment files.

Setup and work with .env files in Laravel from the command line NOTE: This doesn't work with Laravel 5 since .env files were changed. This is for Lara

Matt Brunt 6 Dec 17, 2022
This package is to add a web interface for Laravel 5 and earlier Artisan.

Nice Artisan This package is to add a web interface for Laravel 5 and earlier Artisan. Installation Add Nice Artisan to your composer.json file : For

null 218 Nov 29, 2022
A nice GUI for Laravel Artisan, ready out of the box, configurable and handy for non-CLI experienced developers.

Artisan UI A nice GUI for Laravel Artisan, ready out of the box, configurable and handy for non-CLI experienced developers. Supported commands must be

Pablo Leone 1 Dec 3, 2021
This Laravel Nova tool lets you run artisan and bash commands directly from Nova 4 or higher.

Laravel Nova tool for running Artisan & Shell commands. This Nova tool lets you run artisan and bash commands directly from nova. This is an extended

Artem Stepanenko 17 Dec 15, 2022