Questions tagged as 'laravel-4'

3
answers

User Authentication with Laravel 4

I'm starting to authenticate users with Laravel 4 as a basis for this link . My doubt and the next, every route, I have to use this way? Route::get('/', array('before' => 'auth'), 'HomeController@index'); I mean, do I have to ent...
asked by 03.07.2014 / 16:52
4
answers

How to use AJAX with Laravel?

I have a select that when I change the value it should reorder a list, eg by id, name, etc. without Laravel I would use a onchange function and pass the sort order to a PHP page that would print this list sorted for me ... But how to d...
asked by 06.02.2014 / 11:35
2
answers

How to load a view into a layout?

I'm trying to load a view into a layout , below my controller below: class IndexController extends BaseController { protected $layout = 'admin.layouts.default'; public function index() { $this->layout->$this->l...
asked by 23.01.2014 / 23:58
1
answer

Rollback in specific table Laravel 4

I am manipulating a MySQL database with Laravel 4. I want to know if there is any way to do a rollback on just one of the database tables. For example, my migration included the x, y, and z tables. I want to do a rollback only on the table and....
asked by 14.12.2015 / 12:57
1
answer

Pick up the average of a field in relationship table many to many Laravel Eloquent

I have a Many to Many relationship and in the relationship table the "value" field. How do I bring the media to this field using Eloquent? Example: Tabela A a_id Relationship Table a_id c_id value Table C c_id The query in my...
asked by 04.07.2014 / 00:38
1
answer

Check if Input :: file exists Laravel

I have a class created by me that uploads files. I would like to check if Input :: file ('image') exists, because if it does not exist, it does not upload the image. Follow my code: if(Input::has('name')){ $file = Input::file('imagem');...
asked by 13.05.2015 / 22:02
1
answer

Doubt with relationship One to Many

I have two tables, produtos and categorias . In my view of produtos I want to show the category name of that product, not your code. Category Template Category.php namespace MagicCommerce\Site\Cadastros; class...
asked by 07.01.2014 / 22:19
3
answers

Should I use routes or controllers in Laravel 4?

I'm a beginner in Laravel and I have questions about using controllers , I read several examples / tutorials and I see the vast majority use the routes for example for a form request , to display pages, even database queries. I'm developin...
asked by 25.12.2013 / 16:54
2
answers

Displaying authenticated user data in view

I have a problem that I think is very simple ... I need to show the username logged in my views ... How do I do this? this is one of the views @extends('layouts.template') @section('body') <h3>List_Lists</h3> <p> <...
asked by 18.12.2013 / 22:09
2
answers

css files in laravel 4

I'm starting with Laravel and I'm not sure where to put the css files, since there is no assets folder, as it exists in Laravel 5. I need to work with version 4 because the PHP version on the server is old and not I can change. I did not find an...
asked by 15.10.2015 / 13:42