Domanda

Hello I have just built my first Laravel 4 application and have had nightmares with the deployment process.

Currently I have my entire application done and working locally which is great but when I upload it to my server is where I run into problems.

I am on shared hosting so I had a symbolic link set to my public folder so that the web server root is correct.

Now when I try and access any page that tries to load any of the models that I have made I get a

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

Size is one of my models and on my local web server I am not having issues like this.

I tried doing a composer dump-autoload and composer dump-autoload -o and reuploaded the files but it has not changed anything.

I checked out this post Class Comment not found Laravel 4 which is the same issue I am having but it has not worked for me.

I have been trying to deploy my application for the past 3 days now and cannot figure it out so this has been very frustrating so any and all help is greatly appreciated!

È stato utile?

Soluzione

Seeing as how size in your error is lowercase, I'm guessing that's the root of your problem.

Model names are almost always StudlyCase. It's likely your web host is case sensitive, whereas your local environment is not. Be consistent!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top