So it is pretty easy to include relationships on models such as: when there’s a get request to the user resource, it will include associated roles automagically. But in this setup, the role resources returned with user resource also includes it’s own included relationships like: This generates huge objects, that mostly include unnecessary related child models. I can workaround this
Tag: laravel-5
Laravel 5 and PHPMailer
Does anybody have a working example how I can work with PHPMailer in Laravel 5? In Laravel 4 it was quiet simple to use but the same method doesn’t work in L5. Here it is what I did in L4: Added in …
How to register console command from package in Laravel 5?
Since Laravel 5, it is interest to me – how to register and use console command from package in Laravel 5. As in laracast discuss https://laracasts.com/discuss/channels/tips/developing-your-packages-in-laravel-5, i create a directory structure, add my package to autoload and create a service provider My InstallCommand.php script stored in /src/Console I register service provider in app.php & execute dump-autoload. But when i try
How to use authentication for multiple tables in Laravel 5
Sometimes, we’d like to separate users and admins in different 2 tables. I think it is a good practice. I am looking if that is possible in Laravel 5.
How to send mail after Laravel 5 default registration?
I’m noob in Laravel and working with Laravel 5. For user registration and and login, I want to use default system of laravel. But, need to extend it with two following features: User will get an …
List all registered variables inside a Laravel view
I am using Laravel 5. I would like to know which are all variables passed to a view inside the view itself. Since all variables are in the view scope I thought I could use the generic PHP function: get_defined_vars(); http://php.net/manual/en/function.get-defined-vars.php Something like this: But I would like to know if there is a better way (something like View::getData()) Note:
$_FILES to a resource – Laravel 5 and Dropbox
Well, I’ve uploaded an app to Heroku, and I’ve discovered that I can’t upload files to it. Then I started to use Dropbox as storage option, and I’ve done a few tests, of send and retrieve link, and all worked fine. Now, the problem is to use the uploadFile() method on DropboxAdapter. He accepts an resource as the file, and
Translate queued mails (localization)
I am looking for a working solution, to translate queued emails in laravel-5. Unfortunately, all emails use the default locale (defined under app.locale). Let’s assume, we have two emails in the …
Laravel 5 input old is empty
My routes is here Controller And View The {{old()}} function return empty value. EDIT I took Answer Your problem looks like you are not actually submitting the username in the first place: There is no ‘submit’ button inside the form. If you submit outside the form – then the username will not be included. Add the submit button inside your
Laravel 5 – redirect to HTTPS
Working on my first Laravel 5 project and not sure where or how to place logic to force HTTPS on my app. The clincher here is that there are many domains pointing to the app and only two out of three …