All Questions

4
votes
2answers
660 views

How to create Helper Methods on Laravel not a Facade

I've read a lot of questions of how to make a helper methods on Laravel 5.1. But I dont want to achieve this in a Facade HelperClass::methodName(); I want to make a Helper Methods just like on this...
24
votes
8answers
70783 views

How to to send mail using gmail in Laravel 5.1?

I try again and again to test sending an email from localhost but I still cannot. I don't know anymore how to do it. I try search to find solution but I cannot find one. I edited config/mail.php: &l...
13
votes
2answers
6629 views

How to protect image from public view in Laravel 5?

I have installed Laravel 5.0 and have made Authentication. Everything is working just fine. My web site is only open for Authenticated members. The content inside is protected to Authenticated member...
2
votes
1answers
2842 views

SQLSTATE[HY000] [2002] A connection attempt failed.. - When attempting to connect from Local to remote server

env file: APP_ENV=local APP_DEBUG=true APP_KEY= ........... DB_HOST=srv3.linuxisrael.co.il DB_DATABASE= name_of_my_database DB_USERNAME=moti_winkler DB_PASSWORD=1234567890 CACHE_DRIVER=file SESSION...
3
votes
5answers
4062 views

Laravel 5.1 multiple authentication

How can you authenticate multiple types of users in Laravel 5.1 e.g. Jobseeker, Recruiter, Admin etc. Some of you have suggested using a single users table to store only the password and email, crea...
5
votes
2answers
1751 views

Laravel validator with a wildcard

i want to make a laravel validator that validates the the fields inside an un-named array ( 0,1,2,3 ) that is inside an array so my array is like array [ //the form data "items" => array:2 [ /...
20
votes
1answers
46844 views

How to execute raw queries with Laravel 5.1?

So I have this tiny query to run on my DB and it works fine in MySQL Workbench. Basically, a SELECT with LEFT JOIN and UNION with LEFT JOIN again. SELECT cards.id_card, cards.hash_card, c...
1
votes
3answers
1247 views

unable to retrieve data sent via ajax in controller Laravel 5.1

I am sending data via ajax to my controller as $.ajax({ url: 'test', type: 'POST', data: { id: sessionStorage.getItem('user_id') }, dataType: 'json', contentType: "application/js...
0
votes
1answers
3440 views

post request not working Laravel 5

I am trying to submit a form using post method, but it does not seem to be working. I have enabled error debug on but still no error is shown. After submitting the form the same page is loaded without...
59
votes
9answers
78727 views

How to get client IP address in Laravel 5.1?

I am trying to get the client's IP address in Laravel. As we all know that it is pretty much easier to get a client's IP in PHP by using $_SERVER["REMOTE_ADDR"]. It is working fine in core PHP, but w...

Previous Next