Questions tagged as 'laravel'

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

How should I organize my controllers using the SOLID methodology?

I am currently developing a project and have noticed that my controllers are responsible for more than one activity. Thinking about it, I remembered the Laravel Brazil Community Hangout on SOLID. The problem is that I do not know the best...
asked by 23.06.2014 / 15:15
1
answer

Create View in MySQL through Laravel

How can I create a view in the MySQL database through migrations of Laravel? I did not find anything in the documentation.     
asked by 26.09.2016 / 19:35
3
answers

Error while joining with Laravel's Query Builder

I'm doing the following Join: public function getStockDanger() { $data = DB::table('product') ->join('stock', 'product.id', '=', 'stock.product_id') ->where('stock.stock', '<=', 0) ->get(); return v...
asked by 07.10.2016 / 19:44
4
answers

Create VirtualHost on port 81

I have two Apaches installed for two versions of PHP (5 and 7), on port 80 and 81 respectively. I would like to create virtualhost for port 81 of apache The host file has this line: Host 127.0.0.1 projeto.dev 127.0.0.1...
asked by 07.06.2018 / 18:51
2
answers

How to return the page with the anchor of the LARAVEL id?

After submitting the form I return to the page in question with two methods, redirect() and back() . In case I'm using the bootstrap tabs and would like to get back with the anchor of the id, eg: return redirect()->back(); /...
asked by 21.06.2016 / 22:42
2
answers

Create profiles in laravel application

I need to modify my laravel application so that each user can see their particular content, since each user will have their own information. I already configured the default authentication using make auth and it works fine.     
asked by 11.10.2017 / 12: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

htmlspecialchars () expects parameter 1 to be string, object given

I'm trying to make a select button on the blade with @foreach to get the list of all MySql databases. Only @foreach works, I can get the values, but I can not put the bases inside select . It is giving error:    htm...
asked by 26.01.2017 / 14:07
1
answer

Laravel Eloquent Relationship Performance

I realize that in Laravel 4 Framework , when we have a relationship, instead of using JOIN of Mysql in the source code of Eloquent , it uses a select. For example. I have these two Models. class Usuario extends Elo...
asked by 29.01.2015 / 16:00