sumit
sumit

Reputation: 15464

Ignore case sensitivity - laravel 4

Let say i have following

$quizresult = Quizresult::findOrFail($id);

My Modal class file name is QuizResult.php

I am working on windows server on localhost which automatically ignores case sensitivity. No matter whether it is Quizresult or QuizResult

When i upload it to linux server it is throwing error

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Class 'Quizresult' not found

Is there any tricks in laravel to ignore case sensitivity?

Upvotes: 0

Views: 2084

Answers (2)

martinstoeckli
martinstoeckli

Reputation: 24101

Finding files is case-insensitive on Windows, but is case-sensitive on Unix systems. It is the same reason that a "wrong" written URL can be found on Windows, but not on Unix.

Whenever you work with filenames/paths for internet applications, you should write your code case sensitive, to stay compatible with other systems.

Upvotes: 3

Thomas Dutrion
Thomas Dutrion

Reputation: 1893

There is no way to remove the case sensitivity in PHP on Linux. It is on a Laravel thing though, it is related to the implementation of the system itself.

I would recommend to use the same version of the system and any software (apache, php...) on all your environments...

Upvotes: 2

Related Questions