All Questions

318
votes
20answers
202119 views

Laravel requires the Mcrypt PHP extension

I am trying to use the migrate function in Laravel 4 on OSX. However, I am getting the following error: Laravel requires the Mcrypt PHP extension. As far as I understand, it's already enabled (see ...
10
votes
7answers
1983 views

How to hide config files from direct access?

I am using Laravel for web app. Uploaded everything on production and found out that some of the files can be directly accessed by url - for example http://example.com/composer.json How to avoid tha...
249
votes
19answers
103101 views

Best practices for custom helpers on Laravel 5

I would like to create some helpers (functions) to avoid repeating code between some views, in L5 style: view.blade.php <p>Foo Formated text: {{ fooFormatText($text) }}</p> They are ba...
113
votes
16answers
94670 views

Laravel 5 - Remove public from URL

I know this is a very popular question but I haven't been able to find a working solution for Laravel 5. I've been trying to migrate from Codeigniter for a long time, but this convoluted installation ...
133
votes
3answers
52126 views

Can anyone explain Laravel 5.2 Multi Auth with example

What I have done so far. I am trying to authenticate users and admin form user table and admin table respectively. I am using the User model as provided by laravel out of the box and created exactly s...
14
votes
2answers
1803 views

Laravel 5.2 Validation Error not appearing in blade

I want to show validation Error in View page while user giving wrong input. It's Ok that it's not saving anything in database while a user giving wrong input. But there is no error message in user vie...
103
votes
9answers
70010 views

Laravel 5: Display HTML with Blade

I have a string returned to one of my views, like this: $text = '<p><strong>Lorem</strong> ipsum dolor <img src="images/test.jpg"></p>' I'm trying to display it with B...
52
votes
14answers
113688 views

How can I remove "public/index.php" in the url generated laravel?

Basically I need to remove index.php or public/index.php from the the generated URL in laravel, commonly path is localhost/public/index.php/someWordForRoute, It should be something like localhost/so...
185
votes
13answers
221653 views

How to create multiple where clause query using Laravel Eloquent?

I'm using the Laravel Eloquent query builder and I have query where I want a WHERE clause on multiple things. It works, but it is not elegant. Example: $results = User:: where('this', '=', 1...
73
votes
6answers
81501 views

Laravel 5 - How to access image uploaded in storage within View?

I have got user's avatars uploaded in Laravel storage. How can I access them and render them in a view? The server is pointing all requests to /public, so how can I show them if they are in the /stor...

Previous Next