A
A
Anton R.2020-09-01 22:39:14
Laravel
Anton R., 2020-09-01 22:39:14

What does the Contents string mean in the Put method of the Storage object?

I see this in the manual:

Storage::disk('local')->put('file.txt', 'Contents');

What does 'Contents' mean in a method? Why is it indicated?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daria Motorina, 2020-09-01
@anton_reut

Storage is a facade for Filesystem, in Filesystem the put method is described like this , it turns out that this is a wrapper for file_put_contents, $contents is just data that needs to be written to a file)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question