In principle it should work the same with either an LDR or a thermistor (for temperature).
However, these simple voltage divider circuits usually let you only use a small portion of the 0V … 5V range of the analog input. With the limited resolution (the Arduino uses 10-bit ADC), things can get a bit coarse. Also, when you move on to do the same with a thermistor you will find that at 5V enough current runs through that little thing to heat it up by several degrees. Turning a thermistor into a heating element isn’t so good when you want to use it to measure temperature.
Here is a thread where I used a dual OP-AMP to counter both problems:
It certainly is a lot more complicated than the simple resistor+NTC or resistor+LDR voltage divider. If you just want to have used an LDR or NTC once, then rip the test setup apart again, it isn’t worth the trouble. If you actually want to use this to measure things for real, then you may want the extra accuracy and resolution.
Accuracy is not an item, just need a sensor to detect differences in light intensity.
I tried an LDR between the analog pin and the + and it does the job.