GithubHelp home page GithubHelp logo

artkonekt / concord Goto Github PK

View Code? Open in Web Editor NEW
203.0 203.0 14.0 354 KB

Laravel extension for building modular applications where modules are decoupled, re-usable and easily customizable

License: MIT License

PHP 100.00%
laravel laravel-extension laravel5 modular modularity

concord'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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

concord's Issues

Use Laravel IOC

Love this concept of packages/modules/boxes. Something that use to be in Laravel but was taken out post 4.2.

Perhaps using standard Laravel IOC would be better long run?

$this->app->bind('Custom/Module/Model', Model::class);

Using it via the Laravel IOC

$model = app()->make('Custom/Module/Model');

This also then works for model binding without having to implement manual binding

Route::get('/{product}', function(Custom/Module/Model $product) {
  return $product;
});

When I set migration to false, then still migration published.

Hi,

Issue:
I have set my migration to false as you mentioned in the documentation.

In concord/config.php I have put my module name namespace with migration false. When I run vendor publish it stills publish the migration folder. May I know the reason why is this happening?

Or is there any global config from where I can set migration to false. Then automatically all migration's publishing stops.

Version:
1.7

Target class [concord] does not exist

Hello,

New guy here, I have tried to setup an external module(Avendor/Demo) with Laravel 6.* and Concord 1.4.* with the below error when specify providers' model to UserProxy::modelClass() in the config file auth.php.

`$ composer dump-autoload
Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
In Container.php line 805:
Target class [concord] does not exist.
In Container.php line 803:
Class concord does not exist
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1`

The simple repo is at https://github.com/sornss/laravel_concord_demo.

Can you please let me know the reason or any help?

Thanks in advance.

Question: stable release?

Hi,

I was having a look at Concord and found these two snippets:

Note: Concord's first stable release is scheduled to October 2017.

Note: Concord's first stable release (1.0) is scheduled to December 2017.

Is the stable release still planned for this month? Cheers.

Route::model binding causing other package route broken

I used vanilo/product package which bound the router parameter "{product}" to Vanilo\Product\Models\Product,
and I have another package which have route like this:

Route::get("products/{product}", function(\Example\Models\Product $product) {

});

it will always return empty $product as its class is not matched with the bound model class.

Is this explicit binding necessary? or implicit binding will be sufficient?

Thanks in advance.

Api Routes Not Found & Conflict between Web Routes & Api Routes

Hello, Attila Fulop

I really loved the concept of the Concord package to achieve the modularity and the extendability of our Laravel applications but after 4 days from the hard working to convert my Laravel boilerplate app to a Concord package, I faced a lot of problems and bugs because of the lack of the information in the documentation and I could solve the bugs by watching and tracing your modules and packages on Github. There is a lot of information should be included in the documentation, Please dig in deeper in the documentation with complete logical examples of code to demonstrate to the developers how to use Concord in a simple logical way.

My Laravel boilerplate app is similar to your Appshell box but my boilerplate consists of two main entities ( Admin Dashboard & Client API ). I turned my Admin Dashboard into a concord package successfully but I have two problems with my Client API.

  1. When making a request to one of my API routes, my fallback route included in api.php responds with "Not Found" message.
  • hint: I made a prefix for my API routes located in (app) RouteServiceProvider.php)

protected function mapApiRoutes()
{
Route::prefix('api/v1')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}

  • I supposed that my API routes dosen't registered but how my fallback route responds with "Not Found" message and below you will discover that fallback route responds instead of my web routes too.
  • This is a snippet from config ->> box.php.

'routes' => [
'files' => ['web', 'api'],
'prefix' => null,
'as' => null,
]

  1. Conflict between web.php and api.php routes.
    I have a task resource route located in api.php for my task module targeting TaskController loctaed in ClientApi ->> TaskController.php and another one for web.php taregting Dashboard ->> TaskController
  • Snippet from api.php route

Route::apiResource('/tasks', 'ClientApi\TaskController');

  • Snippet from web.php route

Route::get('dashboard/tasks', 'Dashboard\TaskController@index')->name('tasks.index');
Route::get('dashboard/tasks/create', 'Dashboard\TaskController@create')->name('tasks.create');
Route::get('dashboard/tasks/{task}', 'Dashboard\TaskController@show')->name('tasks.show');
Route::post('dashboard/tasks', 'Dashboard\TaskController@store')->name('tasks.store');
Route::get('dashboard/tasks/{task}/edit', 'Dashboard\TaskController@edit')->name('tasks.edit');
Route::put('dashboard/tasks/{task}', 'Dashboard\TaskController@update')->name('tasks.update');
Route::delete('dashboard/tasks/{task}','Dashboard\TaskController@destroy')>name('tasks.destroy');

Now, The problem is if I tried to access eg: "http://localhost/dashboard/task" from my browser, the fallback route located in api.php responds with not found and if I commented Route::apiResource('/tasks', 'ClientApi\TaskController'); every thing will working fine on dashboard, So I think there are a conflict between Api and Web routes.

I have another quick questions:

  • Why you don't include Policies in your modules structure?
  • Why you thinking about removing helpers in the next updates and if that happens will my app blew up after updating the Concord package to the new version?

Regards,

is there way to use concord with phpstorm auto complete?

No auto-complete and type-hints support for phpstorm?

ex)
UserProxy::find <- static find not found.
function foo(...\Contracts\User $user) { return $user->posts; } <- relationship posts not found.

I don't want to define some relationship methods within Model and Contract both together.

huh?

[question] How to use custom models?

Hi! I'm trying to use a custom model throw the ModelProxy, but I can't figure out how to do that.

I have created a repo that shows what I'm doing and a test that fails. I'm registering the custom model in the AppServiceProvider

Can you help me, please?

Thanks in advance!

Livewire

Hi.
Is it possible to work with Livewire separately in each module?

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.