Laravel-admin: Purpose of v2?

Created on 30 Oct 2020  ·  6Comments  ·  Source: z-song/laravel-admin

This is not issue, more of a question.
Im interested if LA will ever by usable with Laravel 7 or 8 and what is final goal of Laravel-Admin v2? I thought LA2 might bring such compatibility, with newer versions of Laravel, but from what I read here in issues it seems to bring only Vue support.

Most helpful comment

@JohnyProkie

The v2 version mainly has the following adjustments

  • The front-end theme has been upgraded from AdminLte v2 to v3, and other front-end libraries have been upgraded to the latest version
  • Use requirejs to implement on-demand loading of all front-end resources
  • Refactored the view rendering mechanism of the component

There is not much change in features, the main purpose is to completely solve some historical problems and increase scalability

At present, I don't have much time to develop this project, so the progress is very slow. I will release the English document after the v2 version is stable.

All 6 comments

@JohnyProkie

The v2 version mainly has the following adjustments

  • The front-end theme has been upgraded from AdminLte v2 to v3, and other front-end libraries have been upgraded to the latest version
  • Use requirejs to implement on-demand loading of all front-end resources
  • Refactored the view rendering mechanism of the component

There is not much change in features, the main purpose is to completely solve some historical problems and increase scalability

At present, I don't have much time to develop this project, so the progress is very slow. I will release the English document after the v2 version is stable.

Thank you for your reply!
Do you plan compatibility with Laravel 7.x or 8.x? Either in LA V2 or in any LA V1 minor version.

Now all queries are made with the Laravel Eloquent Model.
Do you also plan to support other types of data delivery?

For example, Jens Segers made a pseudo-model (a class that behaves like a model, but isn't connected to a database). It can be found here: https://github.com/jenssegers/model. This model is used in many projects, like https://github.com/swisnl/json-api-client, that is a library to convert JSONAPI (https://jsonapi.org/format) data to the Jens Segers Pseudo-Model.

I would like to use Laravel Admin with a custom CRUD, so that I can receive my data through my API.
You could build something like CrudInterface that is an interface for DatabaseCrud (The CRUD that will work with the Laravel Eloquent Model) and a CRUD that can make myself, for example JsonApiCrud, that will connect to my API.
The CRUD then will receive:

  • Wanted relations (DB: ->with() / JSON: ?include= )
  • Visisble columns (maybe)
  • Id (For View and Edit)
  • Filters
  • Search Query
  • Sorting/Ordering options (JSONAPI is able to do multisort; ?sort=-created,title means: sort by created (DESC) and title (ASC))
  • Pagination info: limit (amount of items per page) and page number (CRUD should give something back so that Grid knows how many pages there are in total)

I would love to see this future in this admin panel, because this is the best admin panel made for Laravel that I found on the internet.
I also tried to implement the code myself, but because it isn't my project and I have to change a lot, I got stuck.

I already mentioned my problem here: https://github.com/z-song/laravel-admin/issues/4617.

Thanks in advance and I hope you will have some more time in the future to make v2.0 very special.

@ben221199
I think this feature is already implemented and documented in the Chinese documents;
https://laravel-admin.org/docs/zh/2.x/model-table-data.
The English version is missing. You can just read the code which is quite clear.

@jswh That is a really cool documentation, but there is a problem. The library I use (https://github.com/swisnl/json-api-client) saves the resource items not as a Laravel's Eloquent Model, but as a Item that extends the model of Jens Segers (https://github.com/jenssegers/model). Because of this, it isn't compatible with Laravel Admin. Also, I don't have filtering here, and some other things I mentioned above.

will this project converted to vue in the next releases? may be v3. @z-song

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benny-sun picture benny-sun  ·  3Comments

greentornado picture greentornado  ·  3Comments

amun1303 picture amun1303  ·  3Comments

xiaalngf picture xiaalngf  ·  3Comments

vlongen picture vlongen  ·  3Comments