Not sure what you want.
The CRUD is a back office admin. Not a front office.
Once you have your articles in your database you can do whatever you want with it.
You can have a totally different front querying the database to generate the view, in php, Angular, Express...as you want.
Yes it a back office admin. But how can use the article model to fetch data
for passing to view by controller that I have created a. Ew one? For
example now I have your back office admin installed and it works fine. But
now I have HomeComtroller the purpose is to use the any model(Article, Tag,
Category) to fetch data from database. So can u help me?
On Friday, February 3, 2017, adbmdp notifications@github.com wrote:
Not sure what you want.
The CRUD is a back office admin. Not a front office.
Once you have your articles in your database you can do whatever you want
with it.
You can have a totally different front querying the database to generate
the view, in php, Angular, Express...as you want.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Laravel-Backpack/CRUD/issues/414#issuecomment-277220889,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD969nBYVtsdB2U7NPMc8C9wJeXcNsZ9ks5rYwi4gaJpZM4L2HzU
.
@adbmdp brother you said well.
but if I want to show images that stored by image field from backpack then how can select image name to show in user end?
Hi @HeroSony - sounds like you just want to get the information from the database and show it on the homepage. If you're struggling with this, I heavily recommend you learn Laravel first and only afterwards try Backpack. Laravel itself has a pretty steep learning curve, so learning both will be very frustrating. Start with this laracasts series. Episodes 7 and 8 treat what you want, but I recommend you watch everything from start to finish. Even if you think you know Laravel - I find out new stuff every time I watch it. Jeffrey is an excellent teacher.
@usmanhafeez147 if you've used the image field type, you just have something like $product->image to use. If so, you can use the url to that like this:
<img src="{{ asset($product->image) }}" />
If you want to show the filename you can use Laravel's Filesystem.
Hope it helps. For future questions of this type (non-bugs) please use the StackOverflow tag "back-ack-for-laravel". Keeping Github only for bugs will allow us to push bugfixes and features faster.
Cheers!
Ok i have tested this buckpack with pages and it's work
With your articles you can for exemple create a function called article in your controller like that
Public function article()
{
$articles = Article::all(); // or what you want to show by query
Return view('layouts.master', compact('articles');
}
layouts.master is un exemple of view you can put you view name whare yiu want to show data
Keep in maind that you can put this code in your propre controllet
After that go to your view and make loop in your html code that showing your posts like this
@fireach ($articles as $article)
This is just exeple to show title of article
You soukd kearn more about fetching data