last day (14 days later) » 

2:55 AM
1
A: Undefined variable in view on server

Achraf KhouadjaAlright just do this , its easy so lets do it from scratch in your root directory open your terminal and type php artisan make:provider ViewcomposerProvider then navigate and open app\providers\ViewcomposerProvider.php add this code to that file namespace App\Providers; use Auth; use I...

 
This is more or less the same I already had. I tried it anyway with the same result.
 
hmm it works for me , anyway what did you change exactly?
 
It does for me too, locally that is. As soon as I upload it to my server it breaks. If you mean what I changed since it worked - then I added this.
 
alright man ,check the edit, it should work
 
That broke the bar. That check I have works fine. The bar does not show on the login page, but it does show on all other pages.
 
2:55 AM
yes this is wierd your check works fine(i just added something to it but i dont think its the issue, check edit), i have everything working in my pc right now,
 
Yes, that is what is so weird about this issue. Everything works perfectly fine on my laptop as well...
@Ohgodwhy I think I figured where the problem is. If I add a dd("test"); in my ViewComposerProvider.php nothing happens on the server, but it does locally. So it seems like my ViewComposerProvider.php does not work on the server. I checked the app.php and it is mentioned there just as on the local version.
 
Check my second update, i think its simpler without a View composer for this case (its the same) + can you please share your app.php providers array?
 
It does work yes. But why does my View Composer not work on the server but it does locally? This is really strange.
 
Can you show me your app.php?
 
But it's now 5 in the morning here so I will be going to bed soon. I just couldn't sleep with this issue. ;)
 
3:01 AM
its fixed right now right? im just curios thats all, i hate it when i can't fix such issues,
 
The issue is fixed, but View Composers does not work on my server. I am pretty sure I can work around this, but I am very curious why this happened.
 
i dont get it, why you have View composers in App\Http\ViewComposers folder? it should be in providers
yea me too im curious
 
Ahh, that was because the Laravel documentation said it was a good location.
You have 1 Provider to delegate your View Composers I guess.
 
yea your right, its ok to do that , its just not the way im used to
 
I was so frustrated about this, that I can't sleep. Just gonna finish that page then. It's by far my best project to date. Laravel is really easy to get into and it works so well.
 
3:07 AM
yea i know, i only have 3 months of development experience , i learned alot with laravel
did you add this to your ComposerServiceProvider
 
Yeah, we all have different ways of doing things. I guess this way is perfect if you have a few View Composers, but the way I started with is better for more View Composers as you can organize them.
 
view()->composer(
'whatever', 'App\Http\ViewComposers\Usercomposer'
);
 
Yes.
I mean, the View Composer works man. Just not on my server. It is 100% the same code as on my local machine.
 
yea , keep in mind (as jeffery says) dont worry about best practices for small projects
your local machine is on windows?
 
Naah but I really tend to worry about such things (I'm a Software Engineer).
Arch Linux
 
3:09 AM
wow lucky you, im a student (not even enginiering)
did you finish studies and working right now?
 
Best part about Denmark, you can choose whatever education you want and you get money for it.
Kinda. I finished the Bachelor and now I'm working for half a year, then I finish the master.
 
im working right now as a server in a coffe shop to collect some money and go somewhere where i can find a future , im from a 3rd dev country
good man keep it up, im from tunisia, good thing about it , that even the GOV websites are shitty (IT SUCKS HERE°
ah so you have a project to finish your studies right?
 
Go to Denmark. It's a bit tough to get started as a foreigner, but as you have you english down, you can get some arrangements made and the government will pay you about 880$ a month to study. And the education is free.
Yeah I have.
But right now "we" hate foreigners.. Because of all the immigrants so it's a bad timing.
 
yea i know that denmark is a great country and i know immigrants etc stuff and of course terrorist attacks (im from a muslim country so im hated despite im not realy a muslim )
but what you said is ammazing about school
can you recomment some universities that have free education ?
if you have time ofc
 
Yeah.. But even black Norwegian tourists are being hated, just because they are not white right now (Norway have a lot different cultures).
Well, all Universities in Denmark, Norway and Sweden at least.
I think. At least here in Denmark.
But you should contact someone who knows more about it, because you want to get some sort of salary while studying, and that's a bit tough.
 
3:17 AM
alright what about having an internship? (a paid one after i have my degree) is it easy to find?
 
Depends on the education, for Software Engineers it's as easy as sending a mail.
 
yea i know 880$ in month is twice my dad salery here (we have a 3 floor house and we are 6 people in the family living well XD )
 
Wow
I am underpaid, young, without experience and I get 4550$/month right now (before taxes).
 
this might sound wierd peter but would you help? if you could ofc , i mean just with advice maybe or information
1 Tunisian dinnar = 1 dollar my father gets 400$ XD
i work for 200$ a month right now
 
Sure thing. My neighbor is Romanian and studying in Denmark, he knows for sure.
 
3:20 AM
might i add you on facebook? you have the freedom to reject
of course
 
Well, you can cut 46% to taxes off mine and then consider everything probably costs 2-3x as much in Denmark. But still, it's better.
Sure go ahead.
Peter Elmegaard Jensen
 
there you go, btw , if you have any kind of probleme i might help you if i can :3
 
But I am well paid. I earn more than my mom after she have been in 1 company for 12 years.
Thanks mate.
 
i know IT devs get paid realy well
especialy in denmark
(and similar countries like sweeden etc)
 
Mmm, but the countries are great.
We pay so much taxes and everything is expensive.
But the salary is also better.
It would literally not be possible to live in Denmark for 400$ a month when you have a family. You get paid more to quit your job.
 
3:24 AM
i know it relatif (in here we dont have many taxes there for low salery but thats because the country is not rich in first place)
ahahahahahahahahahaha
( i sent the request my name is achraf btw)
oh silly me its writen already
 
Hehe
Yeah
I accepted. I rarely use Facebook, but messages I get on the phone so you can just write me.
 
Dont worry mate i wont bother you with questions etc , you are the first person i know from denmark
anyway you said you are tiered , i think i should let you go to sleep :3 i should too i work tomorrow, if you encouter any probleme or if you found out why the provider didnt work pls tell me :3
 
No worries, happy to help. You fixed my problem might as well try and fix yours. ;)
Will do!
Good night mate.
 
Good night peter , stay gold
 

last day (14 days later) »