All Questions

326
votes
20answers
206495 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 ...
123
votes
19answers
103477 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 ...
13
votes
7answers
2306 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...
266
votes
20answers
109772 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...
137
votes
3answers
53783 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...
15
votes
2answers
2005 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...
114
votes
9answers
78980 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...
54
votes
14answers
119366 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...
78
votes
6answers
90124 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...
64
votes
3answers
45729 views

How to use multiple database in Laravel

I want to combine multiple databases in my system. Most of the time the database is MySQL; but it may differ in future i.e. Admin can generate such a reports which is use source of heterogeneous data...

Previous Next