Giter Site home page Giter Site logo

larapack / hooks Goto Github PK

View Code? Open in Web Editor NEW
218.0 7.0 15.0 9.44 MB

Hooks is a extension system for your Laravel application.

Home Page: https://larapack.io

License: MIT License

PHP 100.00%
laravel hooks laravel-package laravel-5-package laravel-packages

hooks's Introduction

Hooks

Build Status Build Status Total Downloads Latest Stable Version License

Made with ❤️ by Mark Topper

Hooks

Hooks is a extension system for your Laravel application.

Installation

Install using composer:

composer require larapack/hooks

Then add the service provider to the configuration:

'providers' => [
    Larapack\Hooks\HooksServiceProvider::class,
],

Packages

Packages can be found on larapack.io.

Integrations

  • Voyager Hooks - Hooks supported directly in the Voyager admin panel.

hooks's People

Contributors

akazorg avatar emptynick avatar fletch3555 avatar marktopper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hooks's Issues

Name collision with Seed files

We cannot use Seed files using the same name of any of Voyager files, like DataRowsTableSeeder, PermissionsTableSeeder, etc., because they are being autoloaded from composer.

As result, when installing a Hook the system will use classes from the auloaded, missing the seeds located on the Hook folder.

This bug was hard to figure out, because install will run fine without any error message.

Hooks Setup Revision

This is a draft for revising the Hooks Setup Process, after a debate on this subject.

I'm not sure how to handle the Enable/Disable.
The initial idea was to control this by loading (or not) the Hook Service Provider, but I think we need to load it in order to use routines enable/disable.

Maybe any of you wizards have an idea on this?
Ping: @marktopper, @fletch3555, @tnylea

Setup Process

  1. Install Hook
    1.1 Download hook
    1.2 Load Hook Service Provider
    1.3 Run Migrations, Seeders and publish assets

  2. Enable Hook
    ???

  3. Disable Hook
    ???

  4. Uninstall Hook
    4.1 Prompt User for deleting data
    4.2 Un-migrate and delete data

Thank you.

[Feature Request] Check requirements

It would be nice if a hook.json file could have some requirements like:

{
    "require": {
         "php": "^7.0",
         "tcg/voyager": "^0.11.1"
    }
}

I will look into how Composer does this.

[Feature Request] Hooks lookup

It will be possible to do some hook lookups.

$search = Hooks::search('Foobar') // Search for `Foobar`
    ->tag('voyager') // Find only hooks with the `voyager` tag
    ->orderBy('downloads')
    ->get();

$hooks = $search->items();
  • Search for hooks
  • Filter hook by type (types: github, private-github, codecanyon) Dropped for now
  • Filter by tags
  • Order hooks (by downloads, views, name or type)

Can't Install voyager-excel

  • Hooks Version: v1.0.10
  • Laravel Version: 6.0
  • PHP Version: 7.2.26

Description:

Can't Install hook voyager-excel, other hooks works fine.

bash-5.0# php artisan hook:install voyager-excel

   ErrorException  : Undefined index: voyager-excel

  at /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1290
    1286|      * @return mixed
    1287|      */
    1288|     public function offsetGet($key)
    1289|     {
  > 1290|         return $this->items[$key];
    1291|     }
    1292|
    1293|     /**
    1294|      * Set the item at a given offset.

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined index: voyager-excel", "/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php", ["voyager-excel"])
      /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1290

  2   Illuminate\Support\Collection::offsetGet("voyager-excel")
      /var/www/html/vendor/larapack/hooks/src/Hooks.php:237

  Please use the argument -v to see more details.

Steps To Reproduce:

Execute command php artisan hook:install voyager-excel

Fix the larapack.io layout

I propose to fix css-styles to correctly display the hooks grid on larapack.io

.hooks{
    display: flex;
    flex-wrap: wrap;
}
.hooks .hook .wrapper{
    padding-bottom: 50px;
}

Customize download from remote site

  • Hooks Version: latest
  • Laravel Version: 8
  • PHP Version: 8

Description:

By default this package gets the plugins from larapack site. Can I customize it so I can get it on my own site? Frankly, the documentation sucks.

composer.json broke by hook setup

  • Hooks Version: v1.0.8
  • Laravel Version: 5.7.19
  • PHP Version: 7.2.10

Description:

composer.json broke by hook setup

Steps To Reproduce:

php artisan hook:setup
git diff composer.json

Error: No newline at end of file

image

[BUG] Writes hooks.js to wrong filesystem

  • Hooks Version: 1.0.8
  • Laravel Version: 5.8.24
  • PHP Version: 7.3
  • Integration: voyager-hooks

Description:

The package attempts to write and load from base_path('hooks/hooks.json'), regardless of available disks in config/filesystems.php. This breaks on frozen filesystems such as AWS Lambda and Google App Engine.

Steps To Reproduce:

Attempt to use the package without write permissions to the local FS. Changing disk configurations in laravel settings is not respected and has no effect.

Certificate is expired

  • Hooks Version: #.#.#
  • Laravel Version: #.#.#
  • PHP Version:

Description:

Hi. Yours certificate is expired. Composer cannot install project dependencies. Please, fix it.

Steps To Reproduce:

compsoer install

If I wanted to modify an existing hook locally, what would be the right way?

  • Hooks Version: master
  • Laravel Version: 5.8.35
  • PHP Version: 7.1.25
  • Voyager: 1.3.0

Description:

If I wanted to modify an existing hook locally, what would be the right way?

Steps To Reproduce:

For example if want modify test-hook

1 into directory hooks
2 git clone https://github.com/larapack/test-hook.git
3 then rename directory test-hook to local-test-hook
4 the same for conposer.json, change "name":"test-hook" to "name":"local-test-hook"
5 add new files (migrations, config, views, ....)
6 php artisan hook:install local-test-hook

it would be correct ???

thank you.

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.