lundi 2 mai 2016

File is too large PhpStorm - Laravel project (Controller)

I hope someone of you can give that one helpful tip ..

[ABOUT PROJECT]

I'm working on a Laravel 5 project. Easiest way to explain it -> it's small airbnb .. User are able to post new advert (not sure is it the right word) of their apartments, and if they are searching a new place, they can search it and FILTER their search ...

[INTRO]

main filters is location (area, city, block?) and price and with advanced filters I have all together 30 filters...

Filters image

[PROBLEM]

I started working on my search filtering in my Controller (OglasController.php)

I'm close to the end, but the problem is , the file is getting to big .. right now the file is having around 250.000 lines of code and file size is 30MB. It's my first time I do website and I don't know am I doing it right ... I filteret my variables with a lot (REALLY A LOT) of nested IF statemants ... My guess is that I'll have around 2M or 4M of lines of code (not sure atm, it's all about potency of number 2)..

[PROBLEM SCREENSHOOT]

enter image description here

I tried to solve my problem, as it is described on this question LINK

but it's still not helping.. And I'm scared my web will load too much time..

Thank you all in advance :)



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1rexQTz
via IFTTT

Aucun commentaire:

Enregistrer un commentaire