Questions tagged as 'laravel-4'

2
answers

How to make a ternary relationship in Laravel?

What is the best way to make a ternary relationship in Laravel? I'm doing a "multi client / company" application (basecamp type) and the following relationship appeared: a user has a (0 .. n) permissão in that organization,...
asked by 03.07.2014 / 17:44
2
answers

How to know the current route in Laravel 4?

In Laravel 5, we can get the current route (say the class instance) using the Illuminate\Http\Request class, using the route method. So: public function handle(Request $request) { $rota = $request->route(); } W...
asked by 12.04.2016 / 18:15
2
answers

How to make models inheritance in Laravel 4

Considering that you have Models Pessoa and Usuario , and that a Usuario is a Pessoa ( Usuario extends Pessoa ), or Usuario belongsTo Pessoa and Pessoa hasOne Usuario . Can Usuario have t...
asked by 03.07.2014 / 22:38
1
answer

Laravel 4.2 - Working with asynchronous tasks to generate reports .xlsx

Hello, I am working with an application in Laravel 4.2 and it requires that when the user requests to generate a system report, a task is launched to generate the report, when this report is ready in a folder, I need to send an email to the user...
asked by 23.11.2016 / 21:02
1
answer

Laravel - How to do a try / catch in the view?

Is there any way to do some try/catch in a view of Laravel 4 ? How could I implement the syntax of blade ? I would like something like: @try <div class="laravel test"> {{ $usuario->nome }} </div>...
asked by 14.07.2015 / 17:31
1
answer

Improvement of image insertion in bd

How would one minimize this image insertion code in the database? // controller/GaleriasController.php public function addGaleria { $galeria = new Galeria; $galeria->descricao = "galeria 1"; $galeria->img1 = Input::file('img1');...
asked by 11.02.2014 / 02:33
1
answer

What is the "url" option in the app / config / app.php configuration file

In Laravel 4 , we have a configuration file app/config/app.php . There is an option called url . Many times I've seen this option empty: 'url' => '', And also I've already tested put some url there: 'url' => 'ht...
asked by 18.04.2016 / 21:16
1
answer

Research developed in AngularJS

I'm completely "zero" in angularJS and need to improve the search functionality on this link site that was not developed by me. At this point the search is "stuck" to the list of features that hang over the search box, not allowing a free s...
asked by 14.10.2015 / 13:43
2
answers

Alternatives to passing data by hidden fields

I'm creating a system, where I always need the id of my object in the DB, and most of the system sends this id of the VIEW pro controller using the fields hidden with a POST. If speaking of security is the best way to do this? I find it ra...
asked by 14.05.2015 / 18:14
2
answers

Protecting routes in Laravel 4

After logging the user into the system I theoretically would have to have some protected routes, how do I do this? In my case it is returning error. See: routes.php Route::group(['before' => 'auth'],function(){ Route::controller('res...
asked by 09.06.2014 / 20:53