Laravel Model::all() or Model::get problem - laravel

I have a project with a database
then i do dd on controller while doing model::get() or model::all()
enter image description here
then i get the result i want like in the first picture
the problem starts from when i create a new project with the same database and the same code, i do model::all() or model::get() but what i get is the result like in the second picture, what should i do to get results like my first project?enter image description here
and thats my problem, how can i get output like picture one? sorry for my bad i am a newbie

try this
model::all()->toArray();

Related

Laravel + Voyager + Blocks - Backend Slider-Block and output

I'm new at Laravel and I'm testing at the moment. And its actually really nice. But now I've got a problem and I don't have a clue how to solve it.
What I did:
Installed Laravel 5.7
Installed Voyager
Installed Voyager Frontend
Installed Voyager Blocks
Now i created my own Block. I want to create an block to display an dynamic slider.
Inside my Page in my Backend it looks actually like this:
http://nimb.ws/gp1WkX
For this my Code inside the /config/page-blocks.php looks like: http://nimb.ws/XVzyCN And you can see i create 6 instances (manually) inside the slider block.
My Output inside the "dynamic_slider.blade.php" look like this: http://nimb.ws/N8ovGD and there is nothing dynamical.
What I want to do:
I want only one instance in my block. With my Image, Title, Subtitle
and Link for my Slide. If an image is uploaded for the first slide -
a second instance reveal and i can add a second slide. And so on...
I want to output my slides inside an foreach loop on my
dynamic_slider.blade.php
I think I know how to output the loop but I cant figure out the step for my admin-block. I hope you guys can help me.

Access 2013 Can't display image from attachment when first opening the database

Having searched vigorously for an answer without result and given the strangeness of the issue, I feel posting a new question is the only hope for getting this resolved.
I have a table with products (ProductName and ProductImage) The image is an attachment field.
I have a search Form (unbound) with a listbox that displays a list of these products (column 1=ID, column 2=Productname, column3=ProductImage)
I have an image control that displays the image of the product with the following code in the ON LOAD event of the form and the AFTER UPDATE event of the listbox.
Me.imgProduct.Picture = Me.lstProduct.Column(3)
And it works, the image gets displayed when the form is loaded and when the selection is changed... At least until I close and reopen the database.
When I freshly open the database and open the form, I get the following error: Runtime-error 2220 Microsoft Access can't open the file product1.png
When I add a random new attachment to a new attachment FIELD or OLE object to ANY table, it works again without flaw.
Please, can somebody explain what's happening here? Is it to do with directory permissions or something? How to resolve this?
Thanks!
I decided to abandon attachment field and am working with links to the images instead.
Question isn't solved, but the problem is.

How do I display a MediaWiki image's file description as its caption?

I want to display an image on our MediaWiki site using the description from its file description page as the caption in the syntax [[File:imagename.png|frame|caption]]. To clarify, I'm not trying to link to the image's description page.
I've read some things about querying the API on this question but I'm struggling to see how I can display the result of the query on the property (be it iiprop=comment or rvprop=content or...something else) in the source itself.
If this is a locally uploaded file, and your description pages don't have extraneous formatting, you could get away with something like this:
[[File:imagename.png|frame|{{File:imagename.png}}]]
But there's plenty of ways that can go wrong...

In Reporting services, how do I add an image from a string or cell in the table?

What I'm trying to do is this: I have a string with the full path to the image. I tried to add an external image to my report and set the image source to my string. but every time I load the report, it doesn't load the image. How do I do this, or is there a better way of doing this?
Thank you
For an External image, the image source needs to be a URL for the image. Reporting Services will try to get the image using anonymous access.
http://technet.microsoft.com/en-us/library/dd220527.aspx
Ok, I got it figured out. What I did was in the image properties, in the General Tab, I selected the image source as External, I then created a report parameter Called "#ImageURL", and selected it in the "Use this image:".
On the form I added this line of code:
ReportViewer1.LocalReport.SetParameters(New Parameter("ImageURL", string.concat("file:\","C:\ImagesFolder\ImageName.jpg")))
this brings up the image correctly.

any tutorials/blogs regarding uploading more than one db images

I have exhausting goggle looking for a way to upload more than one db images.
I had a look at
http://www.mikesdotnetting.com/Article/125/ASP.NET-MVC-Uploading-and-Downloading-Files or http://mattias-jakobsson.net/post/2009/11/19/Handling-image-uploads-with-AspNet-Mvc.aspx or http://www.johnpscott.co.uk/devnotes/picpick/default.aspx or http://rusanu.com/2010/12/28/download-and-upload-images-from-sql-server-with-asp-net-mvc/ and so on. I no luck.
Does anyone has a tutorial or recommend a book that demostrate how to upload more than one db images. I am using vs 2010, asp.net mvc3 in C# with SQL Server 2008R2. All I am trying to do is to have couple db images for each product.
Thanks
The first link you provided is a good start for what you need.
Store all images for a product change....
It shows how to upload multiple files. From this you could modify the table where the images are inserted to add a key for the record relation back to your product.
Retrieve all images for a product change...
To pull them back from the database you would call the code in the same article (GetFile), modifying the select statement to include your product key INSTEAD of the ID of the individual image.
Display all images for a product change...
This is where it changes quite a bit. The author of the first article still returns one file as a FileContentResult. Obviously, this won't work for your situation.
Have a look at this article. It uses an XML file to load up multiple images BUT you would replace this code with the code in GetFiles to create the Image List. It shows how to create a controller, model and view for this. You could create a partial view to have the images on the same page as the product view.
This sample shows how to get an image list out of the DB into a view. (To help with modifying GetFiles to better work for this...)

Resources