Coder Social home page Coder Social logo

nwidart / nwidart-docs Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 152.0 8.18 MB

Home Page: https://nwidart.com

License: MIT License

Shell 0.18% PHP 9.06% JavaScript 20.18% CSS 28.84% HTML 36.26% CoffeeScript 2.63% Dockerfile 0.20% Blade 2.65%
hacktoberfest

nwidart-docs's Introduction

Nwidart package documentation

This repository contains the documentation of several nwidart packages. The application is automatically deployed to https://nwidart.com

Credits

About Nicolas Widart

Nicolas Widart is a freelance developer specialising in Laravel development and consulting. Find out more on my website

License

The MIT License (MIT). Please see License File for more information.

nwidart-docs's People

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

Watchers

 avatar  avatar  avatar  avatar

nwidart-docs's Issues

Enable or disable module

Hi nicolas,
Before i use your module and i use this commande to activ or not a module in my web site

module.json


{
    "name": "Article",
    "alias": "article",
    "description": "Administration des articles",
    "keywords": [],
    "active": 1,
    "order": 0,
    "providers": [
        "Modules\\Article\\Providers\\ArticleServiceProvider"
    ],
    "aliases": [],
    "files": [],
    "requires": []
} 

in my module page i make as :
module.blade.php

@foreach ($modules as $module)
    <tr>
        <td>{{ $module->getname() }}</td>
        <td>{{ $module->getdescription()}}</td>
        <td>
            @if($module->getname() != "Admin" )
                <form method="post" action="{{route('admin_etat_module')}}">
                    <input type="hidden" name="modulename" value="{{$module->getname()}}"/>
                    <input type="checkbox"
                           name="etat" @if($module->active) checked  @endif
                           data-size="xs"
                           class="submit"
                           data-style="slow "
                    />
                    {{csrf_field()}}
                </form>
           @endif
        </td>
    </tr>
@endforeach

But in a new version i have this error

Undefined property: Nwidart\Modules\Laravel\Module::$active (View: E:\01-www\a2imv2\Modules\Admin\Resources\views\module.blade.php)

How i can make it for enable or disable module for my all user?

thanks for your help!

problem with publishing automatically module in Modules/ folder

Hello!
I am having a problem when I try to install some module automatically through composer.json using "joshbrw/laravel-module-installer".
The repository is deprived of Bitbucket, usually downloaded, but the "Modules/" folder is added as "Modules/" again instead of adding the real name of the module (eg ApiModule), ie this "Modules/Modules/", should be "Modules/ApiModule/". If you can help.

Here are the codes:

No composer.json (root):
"Require": {
     ....
       "Nwidart / laravel-modules": "^ 1.19",
       "Joshbrw / laravel-module-installer": "v0.1.2",
       "Xxxxx / api-module": "*",
     ....
},
"Repositories": [
        {
            "Type": "package",
            "Package": {
                "Name": "xxxxx / api-module",
                "Version": "0.0.1",
                "Type": "laravel-module",
                "Source": {
                    "Url": "[email protected]: xxxxx / api-module.git",
                    "Type": "git",
                    "Reference": "origin / master"
                }
            }
        }
    ],

In the composer.json (from the module):
"Type": "laravel-module",

What am I doing wrong?
Thanks!

Class 'Modules\ModuleName\Providers\RouteServiceProvider' not found

I am using this package with laravel 6, And I am facing the issue, laravel is not able to find the class, while the class exist, there, Please help me figure out and resolve the issue, I also added the following code in the app.php providers array.

        Modules\ModuleName\Providers\DmirServiceProvider::class,
        Modules\ModuleName\Providers\RouteServiceProvider::class,

no support for tinker to use the modules factory

when we create a factory with the module sometimes we dont need the seeder to run the factory and we want to use the tinker to run commands to use the factory but i had tried every possible methods but didn't work as you can see in the picture
Screenshot 2024-02-07 at 10 15 55 AM

Laravel 6

Hi, thanks for all your great libraries. I am planning on using this in the latest laravel 6 version. Any plans on upgrading this for 6?

EventServiceProvider

not work observer

public function boot()
{
    User::observe(UserObserver::class);
}

Code block CSS in Safari

Hello.
I'm checking out the docs in Safari on MacOS High Sierra and the code examples gets a rendered with a quite unreadable font color.

Here's what it looks like in Safari:
untitled 2

And here's what it looks like in Firefox:
firefox

It seems like Safari is completely ignoring the rules when I inspect the elements too.
#damnYouSafari

Events / Listeners

Hi,

it's supposed to add to EventServiceProvider.php, the events created in modules folder? Is this the best way?

Thanks.

Best regards,
Marcelo

Proposed Version Functionality and Simplified Module Installation

I've been exploring nwidart-docs and have identified a couple of areas that could enhance the management of modules.

Suggestions

  1. Versioning with getVersion()

    • Currently, the version details are not visible in module.json.
    • Proposal: Incorporate version information in module.json and introduce a getVersion() function to facilitate easier tracking of module versions.
  2. Simplified Install/Uninstall Process

    • The current system includes activate and deactivate functions, but updating modules can be challenging.
    • Proposal: Implement an upload functionality to streamline module updates. For example, a function like Modules::install('modulepath.zip'), where modulepath could be a URL or a local path, to simplify the installation process.

Additional Notes

  • I'm not sure if some of these features are already in development or exist, and I may have overlooked them. Please update me if that's the case.
  • I am willing to contribute to the development of these features if they are not already planned.

Looking forward to the possibility of contributing to the nWidart project.

Unable to create nested modules

i want to group modules further, for example i want to create sub folder inside main Module directory then create modules inside that directory e.g Modules/Core/Base, Modules/Core/Setting etc. but whenever i run command php artisan module:make Core/Base it throw an error Nwidart\Modules\Exceptions\ModuleNotFoundException : Module [Core/Base] does not exist!
how i can group nested modules. Thanks!

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.